[neon/backports-jammy/packagekit/Neon/release] debian/patches: Drop patches applied upstream

Scarlett Moore null at kde.org
Fri Sep 15 12:51:39 BST 2023


Git commit ac6afa88bc5d2755d37a16e377e6dccb46f12813 by Scarlett Moore.
Committed on 15/09/2023 at 13:51.
Pushed by scarlettmoore into branch 'Neon/release'.

Drop patches applied upstream

D  +0    -57   debian/patches/01_shutdown-daemon-on-idle.patch
D  +0    -42   debian/patches/02_apt-better-repo-names.patch
D  +0    -34   debian/patches/03_apt-update-urgency-as-status.patch
D  +0    -22   debian/patches/04_pkcon-fix-progressbar-padding.patch
D  +0    -22   debian/patches/05_fix-uninitialized-timer.patch
D  +0    -122  debian/patches/06_apt-fix-mimetype-search-crash.patch
M  +0    -6    debian/patches/series

https://invent.kde.org/neon/backports-jammy/packagekit/-/commit/ac6afa88bc5d2755d37a16e377e6dccb46f12813

diff --git a/debian/patches/01_shutdown-daemon-on-idle.patch b/debian/patches/01_shutdown-daemon-on-idle.patch
deleted file mode 100644
index 25c3f4ee..00000000
--- a/debian/patches/01_shutdown-daemon-on-idle.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From e4528053849b61c6ba0473379fd68c76994019f5 Mon Sep 17 00:00:00 2001
-From: Russell Haley <yumpusamongus at gmail.com>
-Date: Mon, 12 Sep 2022 12:36:10 -0500
-Subject: [PATCH] Shutdown daemon on idle again
-
-This reverts commit dca1f5b2508a4632d0b9fefab771a5a9caf83a5c.
-
-Which reverted commit 0c84d71509e851db20445c747529bd7d3724f081,
-which reverted commit c6eb3555ec5b41e988c111d276764d55fb83bda3.
-
-Fixes #460.
-
-The memory usage of packagekitd has been observed growing well beyond
-half a GiB.  See:
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1354074
-https://bugzilla.redhat.com/show_bug.cgi?id=1854875
-https://bugzilla.redhat.com/show_bug.cgi?id=1896964
-
-As I understand it, this timeout causes some slightly surprising
-behavior when users mix command line dnf upgades with GUI PackageKit
-upgrades, and do not manually run an update check before rebooting for
-update. But that is an edge case, and the price of not having it is too
-high.
----
- src/pk-main.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/pk-main.c b/src/pk-main.c
-index d372a7456..64d34bc91 100644
---- a/src/pk-main.c
-+++ b/src/pk-main.c
-@@ -182,8 +182,19 @@ main (int argc, char *argv[])
- 	syslog (LOG_DAEMON | LOG_DEBUG, "daemon start");
- 
- 	/* after how long do we timeout? */
--	exit_idle_time = g_key_file_get_integer (conf, "Daemon", "ShutdownTimeout", NULL);
--	g_debug ("daemon shutdown set to %i seconds", exit_idle_time);
-+	exit_idle_time = g_key_file_get_integer (conf, "Daemon", "ShutdownTimeout", &error);
-+	/* THIS COMMENT IS A TSUNAMI STONE
-+	 * The automatic shutdown is useful to prevent memory leaks in some backends
-+	 * from getting out of hand. If you want to remove the timeout, please ensure
-+	 * you are not regressing Red Hat bugzilla #1354074. */
-+	if (error != NULL) {
-+		exit_idle_time = 300;
-+		g_clear_error (&error);
-+	}
-+	if (exit_idle_time > 0)
-+		g_debug ("daemon shutdown set to %i seconds", exit_idle_time);
-+	else
-+		g_debug ("daemon will not shut down on idle");
- 
- 	/* override the backend name */
- 	if (backend_name != NULL) {
--- 
-2.39.1
-
diff --git a/debian/patches/02_apt-better-repo-names.patch b/debian/patches/02_apt-better-repo-names.patch
deleted file mode 100644
index 3808d14d..00000000
--- a/debian/patches/02_apt-better-repo-names.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 3124f67048c0ac7397f24ca8a82a0aa615b1d684 Mon Sep 17 00:00:00 2001
-From: Matthias Klumpp <matthias at tenstral.net>
-Date: Mon, 9 Jan 2023 03:36:03 +0100
-Subject: [PATCH] apt: Display more useful pretty names for repositories
-
-Previously they all had names like "Xenial" or "Stable", which is not
-very useful and causes users to blindly disable repositories that they
-might need.
----
- backends/apt/apt-sourceslist.cpp | 19 ++++++++++++++++++-
- 1 file changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/backends/apt/apt-sourceslist.cpp b/backends/apt/apt-sourceslist.cpp
-index c0d3a94c7..7c06d741d 100644
---- a/backends/apt/apt-sourceslist.cpp
-+++ b/backends/apt/apt-sourceslist.cpp
-@@ -472,7 +472,24 @@ string SourcesList::SourceRecord::niceName()
-         ret += " Sources";
-     }
- 
--    return ret;
-+    std::string uri_info;
-+    size_t schema_pos = URI.find("://");
-+    if (schema_pos == std::string::npos) {
-+        uri_info = URI;
-+    } else {
-+        uri_info = URI.substr(schema_pos + 3);
-+        if (uri_info.back() == '/')
-+            uri_info.pop_back();
-+    }
-+
-+    if (g_pattern_match_simple ("*.debian.org/*", uri_info.c_str()))
-+        return "Debian " + ret;
-+    if (g_pattern_match_simple ("*.ubuntu.com/*", uri_info.c_str()))
-+        return "Debian " + ret;
-+    if (g_pattern_match_simple ("*.pureos.net/*", uri_info.c_str()))
-+        return "PureOS " + ret;
-+
-+    return uri_info + " - " + ret;
- }
- 
- string SourcesList::SourceRecord::repoId()
diff --git a/debian/patches/03_apt-update-urgency-as-status.patch b/debian/patches/03_apt-update-urgency-as-status.patch
deleted file mode 100644
index 2f2a28ce..00000000
--- a/debian/patches/03_apt-update-urgency-as-status.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 140b060111ede3049533ca781b38e7fb6b9a62ca Mon Sep 17 00:00:00 2001
-From: Matthias Klumpp <matthias at tenstral.net>
-Date: Fri, 10 Feb 2023 23:14:31 +0100
-Subject: [PATCH] apt: Set update urgency as urgency as well as status again
-
-Apparently doing anything else confuses frontends that have worked with
-the old code before.
----
- backends/apt/apt-job.cpp | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/backends/apt/apt-job.cpp b/backends/apt/apt-job.cpp
-index a670e3c55..d983374b0 100644
---- a/backends/apt/apt-job.cpp
-+++ b/backends/apt/apt-job.cpp
-@@ -573,6 +573,8 @@ void AptJob::emitUpdates(PkgList &output, PkBitfield filters)
-                 state = PK_INFO_ENUM_SECURITY;
-             } else if (ends_with(archive, "-backports")) {
-                 state = PK_INFO_ENUM_ENHANCEMENT;
-+            } else if (ends_with(archive, "-proposed-updates") || ends_with(archive, "-updates-proposed")) {
-+                state = PK_INFO_ENUM_LOW;
-             } else if (ends_with(archive, "-updates")) {
-                 state = PK_INFO_ENUM_BUGFIX;
-             }
-@@ -581,7 +583,8 @@ void AptJob::emitUpdates(PkgList &output, PkBitfield filters)
-             state = PK_INFO_ENUM_ENHANCEMENT;
-         }
- 
--        stagePackageForEmit(pkgArray, pkgInfo.ver, PK_INFO_ENUM_UNKNOWN, state);
-+        // NOTE: Frontends expect us to pass the update urgency as both its state *and* actual urgency value here.
-+        stagePackageForEmit(pkgArray, pkgInfo.ver, state, state);
-     }
- 
-     // emit
diff --git a/debian/patches/04_pkcon-fix-progressbar-padding.patch b/debian/patches/04_pkcon-fix-progressbar-padding.patch
deleted file mode 100644
index acc56d59..00000000
--- a/debian/patches/04_pkcon-fix-progressbar-padding.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From de8977d1c0e8d23f7da5eef73977b6b98655e0a7 Mon Sep 17 00:00:00 2001
-From: Frank Dana <ferdnyc at gmail.com>
-Date: Fri, 20 Jan 2023 19:33:59 -0500
-Subject: [PATCH] pkcon: Widen progressbar text area
-
----
- client/pk-console.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/client/pk-console.c b/client/pk-console.c
-index bd57e82f3..b16a8e3c7 100644
---- a/client/pk-console.c
-+++ b/client/pk-console.c
-@@ -1639,7 +1639,7 @@ main (int argc, char *argv[])
- 	g_autofree gchar *filter = NULL;
- 	g_autofree gchar *options_help = NULL;
- 	g_autofree gchar *summary = NULL;
--	guint bar_padding = 30;
-+	guint bar_padding = 40;
- 	guint bar_size = 25;
- 	struct winsize w;
- 
diff --git a/debian/patches/05_fix-uninitialized-timer.patch b/debian/patches/05_fix-uninitialized-timer.patch
deleted file mode 100644
index 6d0a4653..00000000
--- a/debian/patches/05_fix-uninitialized-timer.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 729323c0a86ac99aaf35c0c6229818813c84568f Mon Sep 17 00:00:00 2001
-From: Gordon Messmer <gordon.messmer at gmail.com>
-Date: Sun, 15 Jan 2023 15:44:18 -0800
-Subject: [PATCH] Fix use of potentially uninitialized timer ID (#599)
-
----
- src/pk-main.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/pk-main.c b/src/pk-main.c
-index d372a7456..43727d206 100644
---- a/src/pk-main.c
-+++ b/src/pk-main.c
-@@ -241,6 +241,8 @@ main (int argc, char *argv[])
- 		helper.loop = loop;
- 		helper.timer_id = g_timeout_add_seconds (5, (GSourceFunc) pk_main_timeout_check_cb, &helper);
- 		g_source_set_name_by_id (helper.timer_id, "[PkMain] main poll");
-+	} else {
-+		helper.timer_id = 0;
- 	}
- 
- 	/* immediatly exit */
diff --git a/debian/patches/06_apt-fix-mimetype-search-crash.patch b/debian/patches/06_apt-fix-mimetype-search-crash.patch
deleted file mode 100644
index adf6b97b..00000000
--- a/debian/patches/06_apt-fix-mimetype-search-crash.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 80a708c59b7aa57c7ca58dddddb67767766fb077 Mon Sep 17 00:00:00 2001
-From: Matthias Klumpp <matthias at tenstral.net>
-Date: Wed, 8 Mar 2023 18:32:13 +0100
-Subject: [PATCH] apt: Don't crash while resolving mimetypes, modernize mime
- search code
-
-Previously we warned when there was no AppStream metadata at all by
-trying to fetch all metadata and warning if we got no result.
-Given the amount of data Debian and Ubuntu ship with now, this is a bad
-idea (as it slows down unsuccessful searches massively), and we should
-do this again only when AsPool has gained a more efficient is_empty()
-method. Therefore, this check was removed for now.
-
-In addition, we stop monitoring the pool for changes, as we will
-immediately close it anyway, so the additional overhead of setting up
-background reloading is not needed. Same applies for loading Flatpak
-data, which we are not concerned with in PackageKit.
-
-We also validate the package-name C string now for being NULL before
-converting it into a std::string, which resolves a crash.
----
- backends/apt/apt-job.cpp | 53 +++++++++++++++++++++-------------------
- backends/apt/meson.build |  2 +-
- 2 files changed, 29 insertions(+), 26 deletions(-)
-
-diff --git a/backends/apt/apt-job.cpp b/backends/apt/apt-job.cpp
-index d983374b0..0b2895350 100644
---- a/backends/apt/apt-job.cpp
-+++ b/backends/apt/apt-job.cpp
-@@ -1442,34 +1442,47 @@ void AptJob::providesMimeType(PkgList &output, gchar **values)
- {
-     g_autoptr(AsPool) pool = NULL;
-     g_autoptr(GError) error = NULL;
--    guint i;
--    vector<string> packages;
-+    std::vector<string> pkg_names;
- 
-     pool = as_pool_new ();
--    as_pool_load (pool, NULL, &error);
--    if (error != NULL) {
--        /* we do not fail here because even with error we might still find metadata */
--        g_warning ("Issue while loading the AppStream metadata pool: %s", error->message);
--        g_error_free (error);
--        error = NULL;
-+
-+    /* don't monitor cache locations or load Flatpak data */
-+    as_pool_remove_flags (pool, AS_POOL_FLAG_MONITOR);
-+    as_pool_remove_flags (pool, AS_POOL_FLAG_LOAD_FLATPAK);
-+
-+    /* try to load the metadata pool */
-+    if (!as_pool_load (pool, NULL, &error)) {
-+        pk_backend_job_error_code(m_job,
-+                                  PK_ERROR_ENUM_INTERNAL_ERROR,
-+                                  "Failed to load AppStream metadata: %s", error->message);
-+        return;
-     }
- 
--    for (i = 0; values[i] != NULL; i++) {
-+    /* search for mimetypes for all values */
-+    for (guint i = 0; values[i] != NULL; i++) {
-         g_autoptr(GPtrArray) result = NULL;
--        guint j;
-+
-         if (m_cancel)
-             break;
- 
--        result = as_pool_get_components_by_provided_item (pool, AS_PROVIDED_KIND_MIMETYPE, values[i]);
--        for (j = 0; j < result->len; j++) {
-+        result = as_pool_get_components_by_provided_item (pool, AS_PROVIDED_KIND_MEDIATYPE, values[i]);
-+        for (guint j = 0; j < result->len; j++) {
-+            const gchar *pkgname;
-             AsComponent *cpt = AS_COMPONENT (g_ptr_array_index (result, j));
--            /* we only select one package per component - on Debian systems, AppStream components never reference multiple packages */
--            packages.push_back (as_component_get_pkgname (cpt));
-+
-+            /* sanity check */
-+            pkgname = as_component_get_pkgname (cpt);
-+            if (pkgname == NULL) {
-+                g_warning ("Component %s has no package name (it was ignored in the search).", as_component_get_data_id (cpt));
-+                continue;
-+            }
-+
-+            pkg_names.push_back (pkgname);
-         }
-     }
- 
-     /* resolve the package names */
--    for (const string &package : packages) {
-+    for (const std::string &package : pkg_names) {
-         if (m_cancel)
-             break;
- 
-@@ -1482,16 +1495,6 @@ void AptJob::providesMimeType(PkgList &output, gchar **values)
- 
-         output.append(ver);
-     }
--
--    /* check if we found nothing because AppStream data is missing completely */
--    if (output.empty()) {
--        g_autoptr(GPtrArray) all_cpts = as_pool_get_components (pool);
--        if (all_cpts->len <= 0) {
--            pk_backend_job_error_code(m_job,
--                                      PK_ERROR_ENUM_INTERNAL_ERROR,
--                                      "No AppStream metadata was found. This means we are unable to find any information for your request.");
--        }
--    }
- }
- 
- bool AptJob::isApplication(const pkgCache::VerIterator &ver)
-diff --git a/backends/apt/meson.build b/backends/apt/meson.build
-index c37f84505..d9f3f52f5 100644
---- a/backends/apt/meson.build
-+++ b/backends/apt/meson.build
-@@ -5,7 +5,7 @@ cpp_compiler = meson.get_compiler('cpp')
- gstreamer_dep = dependency('gstreamer-1.0')
- gstreamer_base_dep = dependency('gstreamer-base-1.0')
- gstreamer_plugins_base_dep = dependency('gstreamer-plugins-base-1.0')
--appstream_dep = dependency('appstream', version: '>=0.12')
-+appstream_dep = dependency('appstream', version: '>=0.16.0')
- apt_pkg_dep = dependency('apt-pkg', version: '>=1.9.2')
- 
- # Check whether apt supports ddtp
diff --git a/debian/patches/series b/debian/patches/series
index 90e2f399..78b2a415 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,2 @@
 restart-on-sddm
 policy.diff
-01_shutdown-daemon-on-idle.patch
-02_apt-better-repo-names.patch
-03_apt-update-urgency-as-status.patch
-04_pkcon-fix-progressbar-padding.patch
-05_fix-uninitialized-timer.patch
-06_apt-fix-mimetype-search-crash.patch


More information about the Neon-commits mailing list