X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8f418981337503ff7abedd872f788b51bcdbc886..acfbd607bd92cc1ba391873ce0ccec7103d858e0:/apt-private/private-update.cc diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index fa827dea4..860d84b86 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -83,14 +83,17 @@ bool DoUpdate(CommandLine &CmdL) for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() != true; ++I) { pkgDepCache::StateCache &state = Cache[I]; - if (I->CurrentVer != 0 && state.Upgradable()) + if (I->CurrentVer != 0 && state.Upgradable() && state.CandidateVer != NULL) upgradable++; } - const char *msg = ngettext( + const char *msg = P_( "%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;