]> git.saurik.com Git - apt.git/commitdiff
document the pkg:any specialcasing in FindPkg as well to make it clear
authorDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 6 Apr 2011 11:27:52 +0000 (13:27 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Wed, 6 Apr 2011 11:27:52 +0000 (13:27 +0200)
that it is a needed "hack" to support multi-arch in the least breaking way

apt-pkg/pkgcache.cc

index c6326abf12fb2d98b67d4e73a3b5433668e2c52d..c16005e380288b3248b24eeaad07aa23a8122aa6 100644 (file)
@@ -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);
        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);
        if (Arch == "any")
                return FindPkg(Name, "any");
        return FindPkg(Name.substr(0, found), Arch);