Hello community,

here is the log from the commit of package PackageKit for openSUSE:Factory 
checked in at 2020-06-18 10:35:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/PackageKit (Old)
 and      /work/SRC/openSUSE:Factory/.PackageKit.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "PackageKit"

Thu Jun 18 10:35:42 2020 rev:202 rq:815257 version:1.1.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/PackageKit/PackageKit.changes    2020-06-08 
23:48:12.266136714 +0200
+++ /work/SRC/openSUSE:Factory/.PackageKit.new.3606/PackageKit.changes  
2020-06-18 10:35:59.062326329 +0200
@@ -1,0 +2,7 @@
+Tue Jun 16 02:07:15 UTC 2020 - Jonathan Kang <songchuan.k...@suse.com>
+
+- Add PackageKit-pkcon-exit-with-retval-5.patch: pkcon: exit with
+  retval 5 if no packages needed be installed
+  (gh#/hughsie/PackageKit#405 bsc#1170562).
+
+-------------------------------------------------------------------

New:
----
  PackageKit-pkcon-exit-with-retval-5.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ PackageKit.spec ++++++
--- /var/tmp/diff_new_pack.6u2wMJ/_old  2020-06-18 10:36:01.030332688 +0200
+++ /var/tmp/diff_new_pack.6u2wMJ/_new  2020-06-18 10:36:01.030332688 +0200
@@ -61,6 +61,8 @@
 Patch5:         PackageKit-zypp-ignore-already-installed-packages.patch
 # PATCH-FIX-UPSTREAM PackageKit-zypp-ensure-ResPool-before-is_tumbleweed.patch 
gh#/hughsie/PackageKit/commit/5c0fd7d7 sck...@suse.com -- zypp: Ensure ResPool 
is built before is_tumbleweed().
 Patch6:         PackageKit-zypp-ensure-ResPool-before-is_tumbleweed.patch
+# PATCH-FIX-UPSTREAM PackageKit-pkcon-exit-with-retval-5.patch 
gh#/hughsie/PackageKit#405 bsc#1170562 sck...@suse.com -- pkcon: exit with 
retval 5 if no packages needed be installed.
+Patch7:         PackageKit-pkcon-exit-with-retval-5.patch
 # PATCH-FIX-OPENSUSE PackageKit-dnf-Add-openSUSE-vendor.patch 
ngomp...@gmail.com -- Add openSUSE vendor
 Patch1001:      PackageKit-dnf-Add-openSUSE-vendor.patch
 # PATCH-FIX-OPENSUSE 
PackageKit-dnf-Add-support-for-AppStream-repodata-basenames-use.patch 
ngomp...@gmail.com -- Band-aid to deal with OBS producing differently named 
appstream repodata files


++++++ PackageKit-pkcon-exit-with-retval-5.patch ++++++
>From 221d6f32268f280de007dcea5a1f44510825ef9b Mon Sep 17 00:00:00 2001
From: Dominique Leuenberger <dims...@opensuse.org>
Date: Thu, 11 Jun 2020 17:50:13 +0200
Subject: [PATCH] pkcon: exit with retval 5 if no packages needed be installed

In case a user asks pkcon to install an already installed package,
so far we returned with:

  Fatal error: The packages are already all installed
  (detailed string provided by the backend)

and retval 7.

Taking pkcon's manpage into account, retval 5 is more appropriate:

RETURN VALUES
       0
           Success

       5
           Nothing useful was done.

       7
           The transaction failed, see the detailed error for more information.
---
 client/pk-console.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/client/pk-console.c b/client/pk-console.c
index 8052e411f..44da4b257 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -666,6 +666,7 @@ pk_console_finished_cb (GObject *object, GAsyncResult *res, 
gpointer data)
                 * fatal in my book */
                g_print ("%s: %s\n", _("Fatal error"), error->message);
                switch (error->code - 0xff) {
+               case PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED:
                case PK_ERROR_ENUM_REPO_NOT_AVAILABLE:
                        ctx->retval = PK_EXIT_CODE_NOTHING_USEFUL;
                        break;
-- 
2.24.0



Reply via email to