summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 23:54:12 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-03-18 23:54:12 +0100
commitc67dc114eafe034b8223ce3df6474f7c25f150a8 (patch)
tree756f6af6a63a57a38b87d44f31cb000d7d6e49d9 /apt-pkg/versionmatch.cc
parente426a5ff1cd02797b29f5781be4d6fc8bdf44610 (diff)
parent8d4c859d0d20687a8ffcf9e1d60466d061c2e24d (diff)
merge MultiArch-ABI. We don't support MultiArch yet (as most other tools),
but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029)
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r--apt-pkg/versionmatch.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index b4d1d4696..e5f0fafd2 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -100,6 +100,8 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
RelLabel = Fragments[J]+2;
else if (stringcasecmp(Fragments[J],Fragments[J]+2,"c=") == 0)
RelComponent = Fragments[J]+2;
+ else if (stringcasecmp(Fragments[J],Fragments[J]+2,"b=") == 0)
+ RelArchitecture = Fragments[J]+2;
}
if (RelVerStr.end()[-1] == '*')
@@ -178,7 +180,7 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (RelVerStr.empty() == true && RelOrigin.empty() == true &&
RelArchive.empty() == true && RelLabel.empty() == true &&
RelRelease.empty() == true && RelCodename.empty() == true &&
- RelComponent.empty() == true)
+ RelComponent.empty() == true && RelArchitecture.empty() == true)
return false;
if (RelVerStr.empty() == false)
@@ -211,6 +213,10 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (File->Component == 0 ||
stringcasecmp(RelComponent,File.Component()) != 0)
return false;
+ if (RelArchitecture.empty() == false)
+ if (File->Architecture == 0 ||
+ stringcasecmp(RelArchitecture,File.Architecture()) != 0)
+ return false;
return true;
}