[neon/kde/plasma-discover/Neon/unstable] debian/patches: test harald's packagekit fix

Carlos De Maine null at kde.org
Wed Apr 10 22:07:25 BST 2024


Git commit a82c9595057f3cab65481d2f66323e042d9dd4fd by Carlos De Maine.
Committed on 10/04/2024 at 21:07.
Pushed by carlosdem into branch 'Neon/unstable'.

test harald's packagekit fix

A  +51   -0    debian/patches/packagekit.diff
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/kde/plasma-discover/-/commit/a82c9595057f3cab65481d2f66323e042d9dd4fd

diff --git a/debian/patches/packagekit.diff b/debian/patches/packagekit.diff
new file mode 100644
index 0000000..868ccf5
--- /dev/null
+++ b/debian/patches/packagekit.diff
@@ -0,0 +1,51 @@
+diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
+index 08e31c4f37c6ab036d0d000225a6936225b1a250..3225d24b28dc36154893ee8c7810269793031d7f 100644
+--- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
++++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
+@@ -708,6 +708,8 @@ ResultsStream *PackageKitBackend::search(const AbstractResourcesBackend::Filters
+                                  kTransform<QVector<StreamResult>>(upgradeablePackages())); // No need for it to be a PKResultsStream
+     } else if (filter.state == AbstractResource::Installed) {
+         return deferredResultStream(u"PackageKitStream-installed"_s, [this, filter = filter](PKResultsStream *stream) {
++            loadAllPackages();
++
+             const auto toResolve = kFilter<QVector<AbstractResource *>>(m_packages.packages, needsResolveFilter);
+ 
+             auto installedAndNameFilter = [filter](AbstractResource *resource) {
+@@ -754,6 +756,8 @@ ResultsStream *PackageKitBackend::search(const AbstractResourcesBackend::Filters
+         });
+     } else if (filter.search.isEmpty() && !filter.category) {
+         return deferredResultStream(u"PackageKitStream-all"_s, [this](PKResultsStream *stream) {
++            loadAllPackages();
++
+             auto resources = kFilter<QVector<AbstractResource *>>(m_packages.packages, [](AbstractResource *resource) {
+                 auto pkResource = qobject_cast<PackageKitResource *>(resource);
+                 return resource->type() != AbstractResource::Technical && pkResource && !pkResource->isCritical() && !pkResource->extendsItself();
+@@ -1158,5 +1162,16 @@ InlineMessage *PackageKitBackend::explainDysfunction() const
+     return AbstractResourcesBackend::explainDysfunction();
+ }
+ 
++void PackageKitBackend::loadAllPackages()
++{
++    const auto components = m_appdata->components();
++    for (const auto &component : components) {
++        if (!component.packageNames().isEmpty()) {
++            addComponent(component);
++        }
++    }
++    includePackagesToAdd();
++}
++
+ #include "PackageKitBackend.moc"
+ #include "moc_PackageKitBackend.cpp"
+diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
+index c93fb68b4e08f23616891f4eebb18a520879f14a..f96be22cc457646d4bbcc069cf8c2e5207127837 100644
+--- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
++++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
+@@ -141,6 +141,7 @@ private Q_SLOTS:
+     void packageDetails(const PackageKit::Details &details);
+     void addPackageToUpdate(PackageKit::Transaction::Info, const QString &pkgid, const QString &summary);
+     void getUpdatesFinished(PackageKit::Transaction::Exit, uint);
++    void loadAllPackages();
+ 
+ Q_SIGNALS:
+     void loadedAppStream();
\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..73ce40e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+packagekit.diff
\ No newline at end of file


More information about the Neon-commits mailing list