diff options
author | Michael Vogt <mvo@debian.org> | 2014-04-25 13:51:50 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-04-25 13:51:50 +0200 |
commit | 15ccc2a685b0b884b393e356f9960e86f97f532d (patch) | |
tree | 920a1fcf6fa2c92a05d0d1d2ccb22eb32b88522e /apt-private/private-list.cc | |
parent | a40c6649b99814c7d30964accdd5ecc4f1ce369a (diff) | |
parent | 506ab3c78fb67f5e452a1748f4870af767de5ebb (diff) |
Merge branch 'debian/sid' into ubuntu/master
Conflicts:
debian/changelog
Diffstat (limited to 'apt-private/private-list.cc')
-rw-r--r-- | apt-private/private-list.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apt-private/private-list.cc b/apt-private/private-list.cc index b053cbcbe..b69002103 100644 --- a/apt-private/private-list.cc +++ b/apt-private/private-list.cc @@ -130,10 +130,11 @@ bool DoList(CommandLine &Cmd) Cache->Head().PackageCount, _("Listing")); GetLocalitySortedVersionSet(CacheFile, bag, matcher, progress); + bool ShowAllVersions = _config->FindB("APT::Cmd::All-Versions", false); for (LocalitySortedVersionSet::iterator V = bag.begin(); V != bag.end(); ++V) { std::stringstream outs; - if(_config->FindB("APT::Cmd::All-Versions", false) == true) + if(ShowAllVersions == true) { ListAllVersions(CacheFile, records, V.ParentPkg(), outs, includeSummary); output_map.insert(std::make_pair<std::string, std::string>( @@ -151,6 +152,18 @@ bool DoList(CommandLine &Cmd) std::cout << (*K).second << std::endl; + // be nice and tell the user if there is more to see + if (bag.size() == 1 && ShowAllVersions == false) + { + // start with -1 as we already displayed one version + int versions = -1; + pkgCache::VerIterator Ver = *bag.begin(); + for ( ; Ver.end() == false; Ver++) + versions++; + if (versions > 0) + _error->Notice(P_("There is %i additional version. Please use the '-a' switch to see it", "There are %i additional versions. Please use the '-a' switch to see them.", versions), versions); + } + return true; } |