|
|
f07c4f |
From 15837579fef30f1e8fe1aa3017eb5441caf3f09c Mon Sep 17 00:00:00 2001
|
|
|
f07c4f |
From: Igor Gnatenko <ignatenko@redhat.com>
|
|
|
f07c4f |
Date: Fri, 17 Feb 2017 21:46:28 +0100
|
|
|
c046e6 |
Subject: [PATCH 1/2] print downloading packages only once
|
|
|
f07c4f |
|
|
|
f07c4f |
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
|
|
|
f07c4f |
---
|
|
|
f07c4f |
dnf/dnf-main.c | 9 +++++++--
|
|
|
f07c4f |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
f07c4f |
|
|
|
f07c4f |
diff --git a/dnf/dnf-main.c b/dnf/dnf-main.c
|
|
|
f07c4f |
index 610ad74..6473bb3 100644
|
|
|
f07c4f |
--- a/dnf/dnf-main.c
|
|
|
f07c4f |
+++ b/dnf/dnf-main.c
|
|
|
f07c4f |
@@ -29,6 +29,7 @@
|
|
|
f07c4f |
static gboolean opt_yes = TRUE;
|
|
|
f07c4f |
static gboolean opt_nodocs = FALSE;
|
|
|
f07c4f |
static gboolean show_help = FALSE;
|
|
|
f07c4f |
+static gboolean dl_pkgs_printed = FALSE;
|
|
|
f07c4f |
|
|
|
f07c4f |
static gboolean
|
|
|
f07c4f |
process_global_option (const gchar *option_name,
|
|
|
f07c4f |
@@ -115,8 +116,11 @@ state_action_changed_cb (DnfState *state,
|
|
|
f07c4f |
g_print("Downloading metadata...\n");
|
|
|
f07c4f |
break;
|
|
|
f07c4f |
case DNF_STATE_ACTION_DOWNLOAD_PACKAGES:
|
|
|
f07c4f |
- g_print("Downloading: %s (%u%%)\n", action_hint,
|
|
|
f07c4f |
- dnf_state_get_percentage (state));
|
|
|
f07c4f |
+ if (!dl_pkgs_printed)
|
|
|
f07c4f |
+ {
|
|
|
f07c4f |
+ g_print("Downloading packages...\n");
|
|
|
f07c4f |
+ dl_pkgs_printed = TRUE;
|
|
|
f07c4f |
+ }
|
|
|
f07c4f |
break;
|
|
|
f07c4f |
case DNF_STATE_ACTION_TEST_COMMIT:
|
|
|
f07c4f |
g_print("Running transaction test...\n");
|
|
|
f07c4f |
@@ -141,6 +145,7 @@ state_action_changed_cb (DnfState *state,
|
|
|
f07c4f |
break;
|
|
|
f07c4f |
case DNF_STATE_ACTION_CLEANUP:
|
|
|
f07c4f |
g_print("Cleanup: %s\n", action_hint);
|
|
|
f07c4f |
+ break;
|
|
|
f07c4f |
default:
|
|
|
f07c4f |
break;
|
|
|
f07c4f |
}
|
|
|
f07c4f |
--
|
|
|
c046e6 |
2.12.1
|
|
|
f07c4f |
|