summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 18:20:02 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-02-11 18:20:02 +0100
commitc5dac10c3dd6d8f54d97d3105803d07fa891fcd4 (patch)
treeb733e5523d5f9a00c7b276a6a5725b19ae3b3b9b /apt-pkg
parent6293e04ff36cd1cb4756fc30a4777ad6aaf8ffac (diff)
downloadapt-c5dac10c3dd6d8f54d97d3105803d07fa891fcd4.tar.gz
Arch() on a MultiArch:all version should return "all" to be compatible
with previous usecases. You now need to requested with Arch(true) the return of the architecture this version (and pseudo package) was created for.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cacheiterators.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index d8e044f88..e8cf28496 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -178,7 +178,16 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
// Accessors
inline const char *VerStr() const {return S->VerStr == 0?0:Owner->StrP + S->VerStr;};
inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;};
- inline const char *Arch() const {return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;};
+ inline const char *Arch() const {
+ if(S->MultiArch == pkgCache::Version::All)
+ return "all";
+ return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
+ };
+ inline const char *Arch(bool const pseudo) const {
+ if(pseudo == false)
+ return Arch();
+ return S->ParentPkg == 0?0:Owner->StrP + ParentPkg()->Arch;
+ };
inline PkgIterator ParentPkg() const {return PkgIterator(*Owner,Owner->PkgP + S->ParentPkg);};
inline DescIterator DescriptionList() const;