diff options
Diffstat (limited to 'apt-pkg/pkgcache.h')
-rw-r--r-- | apt-pkg/pkgcache.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h index 82a69b2ca..280f37bca 100644 --- a/apt-pkg/pkgcache.h +++ b/apt-pkg/pkgcache.h @@ -215,6 +215,7 @@ class pkgCache /*{{{*/ private: bool MultiArchEnabled; PkgIterator SingleArchFindPkg(const string &Name); + inline char const * const NativeArch() const; }; /*}}}*/ // Header structure /*{{{*/ @@ -499,15 +500,18 @@ struct pkgCache::Version map_ptrloc VerStr; // StringItem /** \brief section this version is filled in */ map_ptrloc Section; // StringItem + + /** \brief Multi-Arch capabilities of a package version */ + enum VerMultiArch { None = 0, /*!< is the default and doesn't trigger special behaviour */ + All = (1<<0), /*!< will cause that Ver.Arch() will report "all" */ + Foreign = (1<<1), /*!< can satisfy dependencies in another architecture */ + Same = (1<<2), /*!< can be co-installed with itself from other architectures */ + Allowed = (1<<3) /*!< other packages are allowed to depend on thispkg:any */ }; /** \brief stores the MultiArch capabilities of this version - None is the default and doesn't trigger special behaviour, - Foreign means that this version can fulfill dependencies even - if it is built for another architecture as the requester. - Same indicates that builds for different architectures can - be co-installed on the system and All is the marker for a - version with the Architecture: all. */ - enum {None, All, Foreign, Same, Allowed} MultiArch; + Flags used are defined in pkgCache::Version::VerMultiArch + */ + unsigned char MultiArch; /** \brief references all the PackageFile's that this version came from @@ -649,6 +653,11 @@ struct pkgCache::StringItem map_ptrloc NextItem; // StringItem }; /*}}}*/ + + +inline char const * const pkgCache::NativeArch() const + { return StrP + HeaderP->Architecture; }; + #include <apt-pkg/cacheiterators.h> inline pkgCache::GrpIterator pkgCache::GrpBegin() |