]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
Fix compressed index retrieval for current timestamps
[apt.git] / cmdline / apt-get.cc
index 34ae2fed94c1ac85a8e1d8a80eef9e03a25f3b53..3c90354b013d10497cb321d5d5bcd4c3dd2c400d 100644 (file)
@@ -1317,9 +1317,11 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
         if (Src.empty() == true) 
         {
            // Sources files have no codename information
-           if (VerTag.empty() == true && DefRel.empty() == false)
-              _error->Warning(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str());
-           DefRel.clear();
+           if (VerTag.empty() == true && DefRel.empty() == false) 
+           {
+              _error->Error(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str());
+              return 0;
+           }
         }
       }
       if (Src.empty() == true)
@@ -1386,8 +1388,8 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
       if (Last != 0 || VerTag.empty() == true)
         break;
       //if (VerTag.empty() == false && Last == 0)
-      _error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
-      VerTag.clear();
+      _error->Error(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
+      return 0;
    }
 
    if (Last == 0 || Last->Jump(Offset) == false)
@@ -1504,10 +1506,9 @@ bool DoAutomaticRemove(CacheFile &Cache)
            // only show stuff in the list that is not yet marked for removal
            if(Cache[Pkg].Delete() == false) 
            {
+              ++autoRemoveCount;
               // we don't need to fill the strings if we don't need them
-              if (smallList == true)
-                 ++autoRemoveCount;
-              else
+              if (smallList == false)
               {
                 autoremovelist += string(Pkg.Name()) + " ";
                 autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
@@ -1520,9 +1521,12 @@ bool DoAutomaticRemove(CacheFile &Cache)
    if (doAutoRemove == false && (autoremovelist.empty() == false || autoRemoveCount != 0))
    {
       if (smallList == false)
-        ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
+        ShowList(c1out, P_("The following package is automatically installed and is no longer required:",
+                 "The following packages were automatically installed and are no longer required:",
+                 autoRemoveCount), autoremovelist, autoremoveversions);
       else
-        ioprintf(c1out, _("%lu packages were automatically installed and are no longer required.\n"), autoRemoveCount);
+        ioprintf(c1out, P_("%lu package was automatically installed and is no longer required.\n",
+                 "%lu packages were automatically installed and are no longer required.\n", autoRemoveCount), autoRemoveCount);
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
    }
    // Now see if we had destroyed anything (if we had done anything)