summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-04-24 10:49:48 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-04-24 10:49:48 +0200
commit3b796dfc90d6ca9d42077bddd38665b0b93a2266 (patch)
tree4ac974c84b74acf1ee70df5157376520d7f14ce8 /cmdline
parent75a53a7c29bf3b2dd8d898ed650b1fe937119080 (diff)
show non-candidates as fallback for virtual packages (Closes: #578385)
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 9d67a82f8..672f64c68 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1147,20 +1147,27 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
Pkg.FullName(true).c_str());
pkgCache::PrvIterator I = Pkg.ProvidesList();
+ unsigned short provider = 0;
for (; I.end() == false; I++)
{
pkgCache::PkgIterator Pkg = I.OwnerPkg();
if (Cache[Pkg].CandidateVerIter(Cache) == I.OwnerVer())
{
+ c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr();
if (Cache[Pkg].Install() == true && Cache[Pkg].NewInstall() == false)
- c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr() <<
- _(" [Installed]") << endl;
- else
- c1out << " " << Pkg.FullName(true) << " " << I.OwnerVer().VerStr() << endl;
- }
+ c1out << _(" [Installed]");
+ c1out << endl;
+ ++provider;
+ }
}
- c1out << _("You should explicitly select one to install.") << endl;
+ // if we found no candidate which provide this package, show non-candidates
+ if (provider == 0)
+ for (I = Pkg.ProvidesList(); I.end() == false; I++)
+ c1out << " " << I.OwnerPkg().FullName(true) << " " << I.OwnerVer().VerStr()
+ << _(" [Not candidate version]") << endl;
+ else
+ c1out << _("You should explicitly select one to install.") << endl;
}
else
{