Просмотр исходного кода

* apt-pkg/pkgcache.cc:
- really ignore :arch in FindPkg() in non-multiarch environment

David Kalnischkies лет назад: 15
Родитель
Сommit
254b8ebb92
2 измененных файлов с 9 добавлено и 4 удалено
  1. 6 3
      apt-pkg/pkgcache.cc
  2. 3 1
      debian/changelog

+ 6 - 3
apt-pkg/pkgcache.cc

@@ -211,11 +211,14 @@ pkgCache::PkgIterator pkgCache::SingleArchFindPkg(const string &Name)
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Returns 0 on error, pointer to the package otherwise */
 /* Returns 0 on error, pointer to the package otherwise */
 pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
 pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
-	if (MultiArchCache() == false)
-		return SingleArchFindPkg(Name);
 	size_t const found = Name.find(':');
 	size_t const found = Name.find(':');
 	if (found == string::npos)
 	if (found == string::npos)
-		return FindPkg(Name, "native");
+	{
+		if (MultiArchCache() == false)
+			return SingleArchFindPkg(Name);
+		else
+			return FindPkg(Name, "native");
+	}
 	string const Arch = Name.substr(found+1);
 	string const Arch = Name.substr(found+1);
 	/* Beware: This is specialcased to handle pkg:any in dependencies as
 	/* Beware: This is specialcased to handle pkg:any in dependencies as
 	   these are linked to virtual pkg:any named packages with all archs.
 	   these are linked to virtual pkg:any named packages with all archs.

+ 3 - 1
debian/changelog

@@ -28,8 +28,10 @@ apt (0.8.14.2) UNRELEASED; urgency=low
     - deprecate mostly undocumented 'markauto' in favor of 'apt-mark'
     - deprecate mostly undocumented 'markauto' in favor of 'apt-mark'
   * cmdline/apt-cache.cc:
   * cmdline/apt-cache.cc:
     - deprecate mostly undocumented 'showauto' in favor of 'apt-mark'
     - deprecate mostly undocumented 'showauto' in favor of 'apt-mark'
+  * apt-pkg/pkgcache.cc:
+    - really ignore :arch in FindPkg() in non-multiarch environment
 
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 21 Apr 2011 17:00:41 +0200
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 25 Apr 2011 13:49:47 +0200
 
 
 apt (0.8.14.1) unstable; urgency=low
 apt (0.8.14.1) unstable; urgency=low