]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
* apt-pkg/contrib/configuration.cc:
[apt.git] / cmdline / apt-get.cc
index 52cbce945cc79abce8cd4cad473873de0d0ff887..672f64c6887e80d7dda8ffe12a368d3d2950e7ef 100644 (file)
@@ -692,7 +692,7 @@ bool CacheFile::CheckDeps(bool AllowBroken)
    }
    else
    {
    }
    else
    {
-      c1out << _("You might want to run `apt-get -f install' to correct these.") << endl;
+      c1out << _("You might want to run 'apt-get -f install' to correct these.") << endl;
       ShowBroken(c1out,*this,true);
 
       return _error->Error(_("Unmet dependencies. Try using -f."));
       ShowBroken(c1out,*this,true);
 
       return _error->Error(_("Unmet dependencies. Try using -f."));
@@ -1147,20 +1147,27 @@ bool TryToInstall(pkgCache::PkgIterator Pkg,pkgDepCache &Cache,
                  Pkg.FullName(true).c_str());
         
         pkgCache::PrvIterator I = Pkg.ProvidesList();
                  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())
            {
         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)
               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
       {
       }
       else
       {
@@ -1826,7 +1833,7 @@ bool DoInstall(CommandLine &CmdL)
         packages */
       if (BrokenFix == true && Cache->BrokenCount() != 0)
       {
         packages */
       if (BrokenFix == true && Cache->BrokenCount() != 0)
       {
-        c1out << _("You might want to run `apt-get -f install' to correct these:") << endl;
+        c1out << _("You might want to run 'apt-get -f install' to correct these:") << endl;
         ShowBroken(c1out,Cache,false);
 
         return _error->Error(_("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)."));
         ShowBroken(c1out,Cache,false);
 
         return _error->Error(_("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)."));