]> git.saurik.com Git - apt.git/commitdiff
Small tweaks to no install candidate warning
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:40 +0000 (16:51 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:40 +0000 (16:51 +0000)
Author: jgg
Date: 1998-11-24 02:35:32 GMT
Small tweaks to no install candidate warning

cmdline/apt-get.cc

index c90c0ed549cc03210e0fd06bfca62f301e8a29f7..42ef548ec9a5e0d4eeec4db6e71274180aaec44f 100644 (file)
@@ -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);