r51529 - /desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch
mak at users.alioth.debian.org
mak at users.alioth.debian.org
Sat Oct 22 14:56:27 UTC 2016
Author: mak
Date: Sat Oct 22 14:56:26 2016
New Revision: 51529
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=51529
Log:
pkgname-sanity.patch: Never pass broken pkgnames to PackageKit for resolving
Added:
desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch
Added: desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch?rev=51529&op=file
==============================================================================
--- desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch (added)
+++ desktop/unstable/gnome-software/debian/patches/01_pkgname-sanity.patch [utf-8] Sat Oct 22 14:56:26 2016
@@ -0,0 +1,37 @@
+From d2fe19b93b0633222d852a0e00d51f0d6ccf8e28 Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard at hughsie.com>
+Date: Wed, 19 Oct 2016 20:27:51 +0100
+Subject: trivial: Add a sanity check when resolving pkgnames
+
+There is a bug in appstream-glib that's triggering on Debian that causes the
+pkgname to be an empty string, which then triggers a bug in aptcc in the
+PackageKit project. Explosions ensue.
+---
+ src/plugins/gs-plugin-packagekit-refine.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
+index 50306b7..5f6aff8 100644
+--- a/src/plugins/gs-plugin-packagekit-refine.c
++++ b/src/plugins/gs-plugin-packagekit-refine.c
+@@ -252,9 +252,17 @@ gs_plugin_packagekit_resolve_packages (GsPlugin *plugin,
+ sources = gs_app_get_sources (app);
+ for (j = 0; j < sources->len; j++) {
+ pkgname = g_ptr_array_index (sources, j);
++ if (pkgname == NULL || pkgname[0] == '\0') {
++ g_warning ("invalid pkgname '%s' for %s",
++ pkgname,
++ gs_app_get_unique_id (app));
++ continue;
++ }
+ g_ptr_array_add (package_ids, g_strdup (pkgname));
+ }
+ }
++ if (package_ids->len == 0)
++ return TRUE;
+ g_ptr_array_add (package_ids, NULL);
+
+ data.app = NULL;
+--
+cgit v0.12
+
More information about the pkg-gnome-commits
mailing list