[neon/backports-jammy/packagekit/Neon/release] debian/patches: update patch from github trunk
Jonathan Esk-Riddell
null at kde.org
Tue Oct 3 13:37:16 BST 2023
Git commit b797075754a61a0c6d5ff3981a3cc02f4924f5ae by Jonathan Esk-Riddell.
Committed on 03/10/2023 at 14:37.
Pushed by jriddell into branch 'Neon/release'.
update patch from github trunk
M +86 -25 debian/patches/upstream_appstream_abi_fix.patch
https://invent.kde.org/neon/backports-jammy/packagekit/-/commit/b797075754a61a0c6d5ff3981a3cc02f4924f5ae
diff --git a/debian/patches/upstream_appstream_abi_fix.patch b/debian/patches/upstream_appstream_abi_fix.patch
index c4f6544..bbe0401 100644
--- a/debian/patches/upstream_appstream_abi_fix.patch
+++ b/debian/patches/upstream_appstream_abi_fix.patch
@@ -1,22 +1,19 @@
-From 7a2e1e81e5831a599660a2f8a7235d01100372e3 Mon Sep 17 00:00:00 2001
-From: Matthias Klumpp <matthias at tenstral.net>
-Date: Thu, 21 Sep 2023 05:15:48 +0200
-Subject: [PATCH] Adjust for upcoming AppStream 1.0 API changes
+commit 825afa2a7cd9e99afa8352bd87e276997f888ee4
+Author: Matthias Klumpp <matthias at tenstral.net>
+Date: Thu Sep 21 05:15:48 2023 +0200
-This is a work-in-progress, as AppStream 1.0 is not released yet.
+ apt/dnf: Adjust for upcoming AppStream 1.0 API
+
+ AppStream 1.0 is not released yet, but this patch makes PackageKit
+ already build with the changed API as well as the older API versions.
+
+ Resolves: #670
-Resolves: #670
----
- backends/apt/apt-job.cpp | 13 +++++++++++--
- backends/dnf/pk-backend-dnf-refresh.c | 1 -
- backends/dnf/pk-backend-dnf.c | 1 -
- 3 files changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/backends/apt/apt-job.cpp b/backends/apt/apt-job.cpp
-index d68c98faa..907059c83 100644
---- a/backends/apt/apt-job.cpp
-+++ b/backends/apt/apt-job.cpp
-@@ -1460,16 +1460,25 @@ void AptJob::providesMimeType(PkgList &output, gchar **values)
+Index: PackageKit-1.2.7/backends/apt/apt-job.cpp
+===================================================================
+--- PackageKit-1.2.7.orig/backends/apt/apt-job.cpp
++++ PackageKit-1.2.7/backends/apt/apt-job.cpp
+@@ -1460,16 +1460,25 @@ void AptJob::providesMimeType(PkgList &o
/* search for mimetypes for all values */
for (guint i = 0; values[i] != NULL; i++) {
@@ -44,10 +41,61 @@ index d68c98faa..907059c83 100644
/* sanity check */
pkgname = as_component_get_pkgname (cpt);
if (pkgname == NULL) {
-diff --git a/backends/dnf/pk-backend-dnf-refresh.c b/backends/dnf/pk-backend-dnf-refresh.c
-index 6d87dc819..efbb12233 100644
---- a/backends/dnf/pk-backend-dnf-refresh.c
-+++ b/backends/dnf/pk-backend-dnf-refresh.c
+Index: PackageKit-1.2.7/backends/dnf/meson.build
+===================================================================
+--- PackageKit-1.2.7.orig/backends/dnf/meson.build
++++ PackageKit-1.2.7/backends/dnf/meson.build
+@@ -1,4 +1,4 @@
+-appstream_dep = dependency('appstream-glib')
++appstream_dep = dependency('appstream', version: '>=0.14.0')
+ dnf_dep = dependency('libdnf', version: '>=0.43.1')
+ rpm_dep = dependency('rpm')
+ c_args = ['-DG_LOG_DOMAIN="PackageKit-DNF"']
+Index: PackageKit-1.2.7/backends/dnf/pk-backend-dnf-common.c
+===================================================================
+--- PackageKit-1.2.7.orig/backends/dnf/pk-backend-dnf-common.c
++++ PackageKit-1.2.7/backends/dnf/pk-backend-dnf-common.c
+@@ -23,7 +23,7 @@
+
+ #include <gmodule.h>
+ #include <glib.h>
+-#include <appstream-glib.h>
++#include <appstream.h>
+ #include <libdnf/libdnf.h>
+
+ #include "pk-shared.h"
+@@ -92,18 +92,15 @@ dnf_utils_refresh_repo_appstream (DnfRep
+ const gchar *as_basenames[] = { "appstream", "appstream-icons", NULL };
+ for (guint i = 0; as_basenames[i] != NULL; i++) {
+ const gchar *tmp = dnf_repo_get_filename_md (repo, as_basenames[i]);
+- if (tmp != NULL) {
+-#if AS_CHECK_VERSION(0,3,4)
+- if (!as_utils_install_filename (AS_UTILS_LOCATION_CACHE,
+- tmp,
+- dnf_repo_get_id (repo),
+- NULL,
+- error)) {
+- return FALSE;
+- }
+-#else
+- g_warning ("need to install AppStream metadata %s", tmp);
+-#endif
++ if (tmp == NULL)
++ continue;
++
++ if (!as_utils_install_metadata_file (AS_METADATA_LOCATION_CACHE,
++ tmp,
++ dnf_repo_get_id (repo),
++ NULL,
++ error)) {
++ return FALSE;
+ }
+ }
+ return TRUE;
+Index: PackageKit-1.2.7/backends/dnf/pk-backend-dnf-refresh.c
+===================================================================
+--- PackageKit-1.2.7.orig/backends/dnf/pk-backend-dnf-refresh.c
++++ PackageKit-1.2.7/backends/dnf/pk-backend-dnf-refresh.c
@@ -26,7 +26,6 @@
#include <glib/gstdio.h>
#include <glib/gi18n.h>
@@ -56,10 +104,10 @@ index 6d87dc819..efbb12233 100644
#include <unistd.h>
#include <stdlib.h>
-diff --git a/backends/dnf/pk-backend-dnf.c b/backends/dnf/pk-backend-dnf.c
-index be99a6df9..4c4bc1f17 100644
---- a/backends/dnf/pk-backend-dnf.c
-+++ b/backends/dnf/pk-backend-dnf.c
+Index: PackageKit-1.2.7/backends/dnf/pk-backend-dnf.c
+===================================================================
+--- PackageKit-1.2.7.orig/backends/dnf/pk-backend-dnf.c
++++ PackageKit-1.2.7/backends/dnf/pk-backend-dnf.c
@@ -25,7 +25,6 @@
#include <glib.h>
#include <glib/gstdio.h>
@@ -68,3 +116,16 @@ index be99a6df9..4c4bc1f17 100644
#include <pk-backend.h>
#include <packagekit-glib2/pk-common-private.h>
+Index: PackageKit-1.2.7/contrib/PackageKit.spec.in
+===================================================================
+--- PackageKit-1.2.7.orig/contrib/PackageKit.spec.in
++++ PackageKit-1.2.7/contrib/PackageKit.spec.in
+@@ -37,7 +37,7 @@ BuildRequires: bash-completion
+
+ %if !0%{?rhel}
+ BuildRequires: rpm-devel >= 4.11.0
+-BuildRequires: libappstream-glib-devel
++BuildRequires: appstream-devel
+ BuildRequires: librepo-devel >= 1.1.5
+ BuildRequires: libsolv-devel
+ BuildRequires: libdnf-devel >= 0.7.0
More information about the Neon-commits
mailing list