Explorar o código

Tell the user if no updates are available after apt update

Thanks to Jakub Wilk for the suggestion.

Closes: #751388
Michael Vogt %!s(int64=12) %!d(string=hai) anos
pai
achega
24d05892fe
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      apt-private/private-update.cc

+ 4 - 1
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;