summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Leuenberger <dimstar@opensuse.org>2020-06-11 17:50:13 +0200
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2020-06-15 13:51:03 -0400
commit221d6f32268f280de007dcea5a1f44510825ef9b (patch)
tree5c0be1e56ec130c6be775bf60b75862149036181
parent0c316176a930516db8f71774ddb6afbbd96663f4 (diff)
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.
-rw-r--r--client/pk-console.c1
1 files changed, 1 insertions, 0 deletions
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;