Accepting request 414965 from home:mlandres:branches:GNOME:Factory
Fix for: Bug 981011 - PackageKit dumps core OBS-URL: https://build.opensuse.org/request/show/414965 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/PackageKit?expand=0&rev=272
This commit is contained in:
parent
26c1dff2a4
commit
80cff4cf50
@ -0,0 +1,29 @@
|
||||
From 90224f3cd99d8f2f4371f7ae9fb8f602e740838d Mon Sep 17 00:00:00 2001
|
||||
From: Michael Andres <ma@suse.de>
|
||||
Date: Fri, 22 Jul 2016 09:17:51 +0200
|
||||
Subject: [PATCH] zypp: Return error if invalid package IDs are detected
|
||||
|
||||
---
|
||||
backends/zypp/pk-backend-zypp.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/backends/zypp/pk-backend-zypp.cpp b/backends/zypp/pk-backend-zypp.cpp
|
||||
index 49282fb..96a8180 100644
|
||||
--- a/backends/zypp/pk-backend-zypp.cpp
|
||||
+++ b/backends/zypp/pk-backend-zypp.cpp
|
||||
@@ -2403,6 +2403,12 @@ backend_get_update_detail_thread (PkBackendJob *job, GVariant *params, gpointer
|
||||
for (uint i = 0; package_ids[i]; i++) {
|
||||
sat::Solvable solvable = zypp_get_package_by_id (package_ids[i]);
|
||||
MIL << package_ids[i] << " " << solvable << endl;
|
||||
+ if (!solvable) {
|
||||
+ // Previously stored package_id no longer matches any solvable.
|
||||
+ zypp_backend_finished_error (job, PK_ERROR_ENUM_PACKAGE_NOT_FOUND,
|
||||
+ "couldn't find package");
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
Capabilities obs = solvable.obsoletes ();
|
||||
|
||||
--
|
||||
2.1.4
|
||||
|
@ -41,6 +41,8 @@ Patch5: PackageKit-fix-offline-trigger.patch
|
||||
Patch6: PackageKit-avoid-endless-loop-on-autoupdate.patch
|
||||
# PATCH-FIX-UPSTREAM PackageKit-annotate-dbus-interface.patch gh#hughsie/PackageKit#147 dimstar@opensuse.org -- Annotate new DBus interface, which is too complex for Qt
|
||||
Patch7: PackageKit-annotate-dbus-interface.patch
|
||||
# PATCH-FIX-UPSTREAM 0001-zypp-Return-error-if-invalid-package-IDs-are-detecte.patch bsc#981011 hughsie/PackageKit#148
|
||||
Patch8: 0001-zypp-Return-error-if-invalid-package-IDs-are-detecte.patch
|
||||
BuildRequires: NetworkManager-devel
|
||||
BuildRequires: automake
|
||||
BuildRequires: fdupes
|
||||
@ -232,6 +234,7 @@ This package provides the upstream default configuration for PackageKit.
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
translation-update-upstream
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user