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

document the pkg:any specialcasing in FindPkg as well to make it clear
that it is a needed "hack" to support multi-arch in the least breaking way

David Kalnischkies лет назад: 15
Родитель
Сommit
eddc9dd092
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      apt-pkg/pkgcache.cc

+ 3 - 0
apt-pkg/pkgcache.cc

@@ -217,6 +217,9 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
 	if (found == string::npos)
 		return FindPkg(Name, "native");
 	string const Arch = Name.substr(found+1);
+	/* Beware: This is specialcased to handle pkg:any in dependencies as
+	   these are linked to virtual pkg:any named packages with all archs.
+	   If you want any arch from a given pkg, use FindPkg(pkg,arch) */
 	if (Arch == "any")
 		return FindPkg(Name, "any");
 	return FindPkg(Name.substr(0, found), Arch);