[SCM] KDE Discover packaging branch, master, updated. debian/5.8.3-1-29-gc17b433

Maximiliano Curia maxy at moszumanska.debian.org
Thu Dec 29 15:37:32 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/plasma/plasma-discover.git;a=commitdiff;h=20aa539

The following commit has been merged in the master branch:
commit 20aa539156b84616cb35feb91acffbee9bdf5c5b
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Thu Dec 29 16:30:31 2016 +0100

    Drop upstream patch: 01_new-appstreamqt.patch
---
 debian/changelog                        |   1 +
 debian/patches/01_new-appstreamqt.patch | 254 --------------------------------
 debian/patches/series                   |   1 -
 3 files changed, 1 insertion(+), 255 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5e0aaf2..bb32744 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ plasma-discover (5.8.5-1~) UNRELEASED; urgency=medium
 
   [ Maximiliano Curia ]
   * New upstream release (5.8.5).
+  * Drop upstream patch: 01_new-appstreamqt.patch
 
  -- Maximiliano Curia <maxy at debian.org>  Wed, 28 Dec 2016 15:24:38 +0100
 
diff --git a/debian/patches/01_new-appstreamqt.patch b/debian/patches/01_new-appstreamqt.patch
deleted file mode 100644
index 91b67d5..0000000
--- a/debian/patches/01_new-appstreamqt.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-commit 5748ab0d65df220ce1e084939b07e32c676f853b
-Author: Matthias Klumpp <matthias at tenstral.net>
-Date:   Sat Nov 5 16:30:43 2016 +0100
-
-    Make Discover compile with newer AppStreamQt releases
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 48a9b77..c59d7ad 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -28,7 +28,15 @@ if (NOT packagekitqt5_FOUND)
-         find_package(KF5 REQUIRED IconThemes Notifications KIO)
-     endif()
- endif()
--find_package(AppstreamQt 0.10)
-+
-+find_package(AppStreamQt 0.10)
-+set(AppStreamTarget "AppStreamQt")
-+if (NOT AppStreamQt_FOUND)
-+    find_package(AppstreamQt 0.10)
-+    set(AppStreamTarget "AppstreamQt")
-+    set(AppStreamQt_FOUND TRUE)
-+endif()
-+
- find_package(KF5Attica 5.23)
- find_package(KF5NewStuff 5.23)
- 
-diff --git a/libdiscover/backends/CMakeLists.txt b/libdiscover/backends/CMakeLists.txt
-index 93497f6..8eb7365 100644
---- a/libdiscover/backends/CMakeLists.txt
-+++ b/libdiscover/backends/CMakeLists.txt
-@@ -20,7 +20,7 @@ if(BODEGA_FOUND)
-     add_subdirectory(BodegaBackend)
- endif()
- 
--if(packagekitqt5_FOUND AND AppstreamQt_FOUND)
-+if(packagekitqt5_FOUND AND AppStreamQt_FOUND)
-     add_subdirectory(PackageKitBackend)
- endif()
- 
-diff --git a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp
-index 658019f..5256db3 100644
---- a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp
-+++ b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.cpp
-@@ -19,8 +19,14 @@
-  ***************************************************************************/
- 
- #include "AppPackageKitResource.h"
-+#ifdef NEWAPPSTREAM
-+#include <AppStreamQt/icon.h>
-+#include <AppStreamQt/screenshot.h>
-+#include <AppStreamQt/image.h>
-+#else
- #include <AppstreamQt/screenshot.h>
- #include <AppstreamQt/image.h>
-+#endif
- // #include <AppstreamQt/release.h>
- #include <KLocalizedString>
- #include <KToolInvocation>
-@@ -52,7 +58,23 @@ QString AppPackageKitResource::longDescription()
- QVariant AppPackageKitResource::icon() const
- {
-     QIcon ret;
--
-+#ifdef NEWAPPSTREAM
-+    const auto icons = m_appdata.icons();
-+    if (icons.isEmpty()) {
-+        ret = QIcon::fromTheme(QStringLiteral("package-x-generic"));
-+    } else foreach(const AppStream::Icon &icon, icons) {
-+        switch(icon.kind()) {
-+            case AppStream::Icon::KindLocal:
-+                ret.addFile(icon.url().toLocalFile(), icon.size());
-+                break;
-+            case AppStream::Icon::KindCached:
-+                ret.addFile(icon.url().toLocalFile(), icon.size());
-+                break;
-+            default:
-+                break;
-+        }
-+    }
-+#else
-     const auto icons = m_appdata.iconUrls();
-     if (icons.isEmpty())
-         return m_appdata.name();
-@@ -66,7 +88,7 @@ QVariant AppPackageKitResource::icon() const
-     if (ret.isNull()) {
-         ret = QIcon::fromTheme(QStringLiteral("package-x-generic"));
-     }
--
-+#endif
-     return ret;
- }
- 
-@@ -105,7 +127,11 @@ QString AppPackageKitResource::appstreamId() const
- 
- QUrl AppPackageKitResource::homepage()
- {
-+#ifdef NEWAPPSTREAM
-+    return m_appdata.url(Appstream::Component::UrlKindHomepage);
-+#else
-     return m_appdata.urls().value(Appstream::Component::UrlKindHomepage);
-+#endif
- }
- 
- bool AppPackageKitResource::isTechnical() const
-@@ -150,13 +176,20 @@ static QUrl screenshot(const Appstream::Component& comp, Appstream::Image::Kind
- 
- QUrl AppPackageKitResource::screenshotUrl()
- {
-+#ifdef NEWAPPSTREAM
-+    return screenshot(m_appdata, Appstream::Image::KindSource);
-+#else
-     return screenshot(m_appdata, Appstream::Image::Plain);
--
-+#endif
- }
- 
- QUrl AppPackageKitResource::thumbnailUrl()
- {
-+#ifdef NEWAPPSTREAM
-+    return screenshot(m_appdata, Appstream::Image::KindThumbnail);
-+#else
-     return screenshot(m_appdata, Appstream::Image::Thumbnail);
-+#endif
- }
- 
- void AppPackageKitResource::fetchScreenshots()
-@@ -164,8 +197,13 @@ void AppPackageKitResource::fetchScreenshots()
-     QList<QUrl> thumbnails, screenshots;
- 
-     Q_FOREACH (const Appstream::Screenshot &s, m_appdata.screenshots()) {
-+#ifdef NEWAPPSTREAM
-+        const QUrl thumbnail = imageOfKind(s.images(), Appstream::Image::KindThumbnail);
-+        const QUrl plain = imageOfKind(s.images(), Appstream::Image::KindSource);
-+#else
-         const QUrl thumbnail = imageOfKind(s.images(), Appstream::Image::Thumbnail);
-         const QUrl plain = imageOfKind(s.images(), Appstream::Image::Plain);
-+#endif
-         if (plain.isEmpty())
-             qWarning() << "invalid screenshot for" << name();
- 
-@@ -183,11 +221,15 @@ bool AppPackageKitResource::canExecute() const
- 
- QStringList AppPackageKitResource::findProvides(Appstream::Provides::Kind kind) const
- {
-+#ifdef NEWAPPSTREAM
-+    return m_appdata.provided(kind).items();
-+#else
-     QStringList ret;
-     Q_FOREACH (Appstream::Provides p, m_appdata.provides())
-         if (p.kind() == kind)
-             ret += p.value();
-     return ret;
-+#endif
- }
- 
- QStringList AppPackageKitResource::allPackageNames() const
-diff --git a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h
-index 08d133d..4ec3681 100644
---- a/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h
-+++ b/libdiscover/backends/PackageKitBackend/AppPackageKitResource.h
-@@ -24,6 +24,10 @@
- #include "PackageKitResource.h"
- #include "PackageKitBackend.h"
- 
-+#ifdef NEWAPPSTREAM
-+namespace Appstream = AppStream;
-+#endif
-+
- class AppPackageKitResource : public PackageKitResource
- {
-     Q_OBJECT
-diff --git a/libdiscover/backends/PackageKitBackend/CMakeLists.txt b/libdiscover/backends/PackageKitBackend/CMakeLists.txt
-index e31ea86..cfebaff 100644
---- a/libdiscover/backends/PackageKitBackend/CMakeLists.txt
-+++ b/libdiscover/backends/PackageKitBackend/CMakeLists.txt
-@@ -10,7 +10,13 @@ add_library(packagekit-backend MODULE PackageKitBackend.cpp
-     PackageKitSourcesBackend.cpp
-     AppstreamReviews.cpp
- )
--target_link_libraries(packagekit-backend PRIVATE Discover::Common Qt5::Core PK::packagekitqt5 KF5::ConfigGui KF5::Service KF5::KIOWidgets KF5::Archive AppstreamQt)
-+
-+if (${AppStreamQt_VERSION} VERSION_LESS 0.10.3)
-+    target_compile_definitions(packagekit-backend PRIVATE -DNEWAPPSTREAM=0)
-+else()
-+    target_compile_definitions(packagekit-backend PRIVATE -DNEWAPPSTREAM=1)
-+endif()
-+target_link_libraries(packagekit-backend PRIVATE Discover::Common Qt5::Core PK::packagekitqt5 KF5::ConfigGui KF5::Service KF5::KIOWidgets KF5::Archive ${AppStreamTarget})
- 
- install(TARGETS packagekit-backend DESTINATION ${PLUGIN_INSTALL_DIR}/discover)
- install(FILES packagekit-backend.desktop DESTINATION ${DATA_INSTALL_DIR}/libdiscover/backends)
-diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
-index d2698e9..3f180e5 100644
---- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
-+++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.cpp
-@@ -54,7 +54,11 @@ PackageKitBackend::PackageKitBackend(QObject* parent)
-     , m_isFetching(0)
-     , m_reviews(new AppstreamReviews(this))
- {
-+#ifdef NEWAPPSTREAM
-+    bool b = m_appdata.load();
-+#else
-     bool b = m_appdata.open();
-+#endif
-     if (!b) {
-         qWarning() << "Could not open the AppStream metadata pool";
- 
-@@ -122,7 +126,11 @@ void PackageKitBackend::reloadPackageList()
-         disconnect(m_refresher.data(), &PackageKit::Transaction::finished, this, &PackageKitBackend::reloadPackageList);
-     }
- 
-+#ifdef NEWAPPSTREAM
-+    const auto components = m_appdata.components();
-+#else
-     const auto components = m_appdata.allComponents();
-+#endif
-     QStringList neededPackages;
-     neededPackages.reserve(components.size());
-     foreach(const Appstream::Component& component, components) {
-@@ -343,7 +351,11 @@ AbstractResource* PackageKitBackend::resourceByPackageName(const QString& name)
- 
- QList<AbstractResource*> PackageKitBackend::searchPackageName(const QString& searchText)
- {
-+#ifdef NEWAPPSTREAM
-+    const QList<Appstream::Component> components = m_appdata.search(searchText);
-+#else
-     const QList<Appstream::Component> components = m_appdata.findComponentsByString(searchText, {});
-+#endif
-     const QStringList ids = kTransform<QStringList>(components, [](const Appstream::Component& comp) { return comp.id(); });
- 
-     return resourcesByPackageNames<QList<AbstractResource*>>(ids);
-diff --git a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
-index 7b8d3fb..562099e 100644
---- a/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
-+++ b/libdiscover/backends/PackageKitBackend/PackageKitBackend.h
-@@ -29,7 +29,18 @@
- #include <QTimer>
- #include <QSet>
- #include <PackageKit/Transaction>
-+
-+#ifdef NEWAPPSTREAM
-+#include <AppStreamQt/pool.h>
-+#include <AppStreamQt/provided.h>
-+namespace AppStream {
-+    typedef Provided Provides;
-+    typedef Pool Database;
-+}
-+namespace Appstream = AppStream;
-+#else
- #include <AppstreamQt/database.h>
-+#endif
- 
- class AppstreamReviews;
- class AppPackageKitResource;
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index aefd0f1..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1 +0,0 @@
-01_new-appstreamqt.patch

-- 
KDE Discover packaging



More information about the pkg-kde-commits mailing list