From: Michael Vogt <mvo@debian.org>
Date: Wed, 18 Jun 2014 06:25:16 +0000 (+0200)
Subject: Tell the user if no updates are available after apt update
X-Git-Tag: 1.0.5~11^2
X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/24d05892fe96d52aaceef7af94d0e444e140067c?hp=--cc

Tell the user if no updates are available after apt update

Thanks to Jakub Wilk for the suggestion.

Closes: #751388
---

24d05892fe96d52aaceef7af94d0e444e140067c
diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc
index fa827dea4..a843d6f86 100644
--- a/apt-private/private-update.cc
+++ b/apt-private/private-update.cc
@@ -90,7 +90,10 @@ bool DoUpdate(CommandLine &CmdL)
          "%i package can be upgraded. Run 'apt list --upgradable' to see it.\n",
          "%i packages can be upgraded. Run 'apt list --upgradable' to see them.\n",
          upgradable);
-      ioprintf(c1out, msg, upgradable);
+      if (upgradable == 0)
+         c1out << _("All packages are up to date.") << std::endl;
+      else
+         ioprintf(c1out, msg, upgradable);
    }
 
    return true;