summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 12:19:48 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 12:19:48 +0100
commit4d174dc84ea184b5afa81abb3b94e2ef3380ece8 (patch)
treee223f1de7c70fd92218e2d203fc13ae5af18bd3b /apt-pkg
parent67e0766f0eab85ce1aeacee75fc6b200f36996c9 (diff)
downloadapt-4d174dc84ea184b5afa81abb3b94e2ef3380ece8.tar.gz
Add Multi-Arch: allowed support by creating an implicit provide of
name:any for such packages, so dependencies in this style can be easily resolved.
Diffstat (limited to 'apt-pkg')
-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 /*{{{*/