From 07801a6de143e56683413789f4e031e051f24536 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:40 +0000 Subject: Small tweaks to no install candidate warning Author: jgg Date: 1998-11-24 02:35:32 GMT Small tweaks to no install candidate warning --- cmdline/apt-get.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index c90c0ed54..42ef548ec 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.18 1998/11/23 07:03:13 jgg Exp $ +// $Id: apt-get.cc,v 1.19 1998/11/24 02:35:32 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -736,6 +736,16 @@ bool DoInstall(CommandLine &CmdL) c1out << "Package " << S << " has no available version, but exists in the database." << endl; c1out << "This typically means that the package was mentioned in a dependency and " << endl; c1out << "never uploaded, or that it is an obsolete package." << endl; + + string List; + pkgCache::DepIterator Dep = Pkg.RevDependsList(); + for (; Dep.end() == false; Dep++) + { + if (Dep->Type != pkgCache::Dep::Replaces) + continue; + List += string(Dep.ParentPkg().Name()) + " "; + } + ShowList(c1out,"However the following packages replace it:",List); } return _error->Error("Package %s has no installation candidate",S); -- cgit v1.2.3