]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
vendor/steamos/*:
[apt.git] / cmdline / apt-get.cc
index 9cc5b40316a9aea420ee6fb36226e05ac880dd45..730d3ea18a2f7a8fbcdd43c090755c46ce31823b 100644 (file)
@@ -269,15 +269,15 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
                  break;
            }
 
+            // ignore arches that are not for us
+            if (ArchTag != "" && Ver.Arch() != ArchTag)
+               continue;
+
             // pick highest version for the arch unless the user wants
             // something else
             if (ArchTag != "" && VerTag == "" && RelTag == "")
-            {
-               if(Ver.Arch() != ArchTag)
-                  continue;
                if(Cache->VS().CmpVersion(VerTag, Ver.VerStr()) < 0)
                   VerTag = Ver.VerStr();
-            }
 
            // We match against a concrete version (or a part of this version)
            if (VerTag.empty() == false &&
@@ -320,6 +320,19 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
         }
       }
 
+      if (Src == "" && ArchTag != "")
+      {
+         if (VerTag != "")
+            _error->Error(_("Can not find a package '%s' with version '%s'"),
+                          Pkg.FullName().c_str(), VerTag.c_str());
+         if (RelTag != "")
+            _error->Error(_("Can not find a package '%s' with release '%s'"),
+                          Pkg.FullName().c_str(), RelTag.c_str());
+         Src = Name;
+         return 0;
+      }
+
+
       if (Src.empty() == true)
       {
         // if we don't have found a fitting package yet so we will
@@ -406,7 +419,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 
       if (Last != 0 || VerTag.empty() == true)
         break;
-      _error->Error(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
+      _error->Error(_("Can not find version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
       return 0;
    }