From 71d98fd80dee81c660e973fd14ea2b035976405d Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Mon, 20 Nov 2006 17:05:13 +0000 Subject: [PATCH] list-updates: warn if we are listing only patches affecting the package manager and there are also others. --- package/zypper.changes | 2 ++ src/zmart-misc.cc | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/package/zypper.changes b/package/zypper.changes index ba57875..f10cdb5 100644 --- a/package/zypper.changes +++ b/package/zypper.changes @@ -2,6 +2,8 @@ Mon Nov 20 17:29:57 CET 2006 - mvidner@suse.cz - Respect "update --skip-interactive" (#221476). +- list-updates: warn if we are listing only patches affecting the + package manager and there are also others. - 0.6.13 ------------------------------------------------------------------- diff --git a/src/zmart-misc.cc b/src/zmart-misc.cc index 9515373..d750757 100644 --- a/src/zmart-misc.cc +++ b/src/zmart-misc.cc @@ -483,17 +483,24 @@ void list_patch_updates () tr << patch->category(); tr << string_status (it->status ()); - tbl << tr; if (patch->affects_pkg_manager ()) pm_tbl << tr; + else + tbl << tr; } } } // those that affect the package manager go first // (TODO: user option for this?) - if (!pm_tbl.empty ()) + if (!pm_tbl.empty ()) { + if (!tbl.empty ()) { + cerr << _("WARNING: These are only the updates affecting the updater itself.\n" + "There are others available too.\n") << flush; + + } tbl = pm_tbl; + } tbl.sort (1); // Name cout << tbl; @@ -639,7 +646,7 @@ void mark_patch_updates (bool skip_interactive) // Skipping a patch because it is interactive and // --skip-interactive is requested. %s is a name of a // patch - cerr << format (_("Warning: %s is interactive, skipped.")) + cerr << format (_("WARNING: %s is interactive, skipped.")) % res << endl; } else { -- 2.7.4