summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/deb/deblistparser.cc6
-rw-r--r--apt-pkg/pkgcache.cc5
2 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index b6082cdd5..3726a6a04 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -642,6 +642,12 @@ bool debListParser::ParseProvides(pkgCache::VerIterator Ver)
}
}
+ if (Ver->MultiArch == pkgCache::Version::Allowed)
+ {
+ string const Package = string(Ver.ParentPkg().Name()).append(":").append("any");
+ NewProvides(Ver, Package, "any", Ver.VerStr());
+ }
+
if (Ver->MultiArch != pkgCache::Version::Foreign)
return true;
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 7d98869ea..2d4ee1010 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -186,7 +186,10 @@ pkgCache::PkgIterator pkgCache::FindPkg(const string &Name) {
size_t const found = Name.find(':');
if (found == string::npos)
return FindPkg(Name, "native");
- return FindPkg(Name.substr(0, found), Name.substr(found+1, string::npos));
+ string const Arch = Name.substr(found+1);
+ if (Arch == "any")
+ return FindPkg(Name, "any");
+ return FindPkg(Name.substr(0, found), Arch);
}
/*}}}*/
// Cache::FindPkg - Locate a package by name /*{{{*/