]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcache.h
More inproved comments about loops.
[apt.git] / apt-pkg / pkgcache.h
index 7995217849e74203e42309780a8f1c5f6b6f934f..1b174372481f0a1a7a43a4ce1fb24c3f7a4d29de 100644 (file)
@@ -146,7 +146,7 @@ class pkgCache                                                              /*{{{*/
    struct Flag
    {
       enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
    struct Flag
    {
       enum PkgFlags {Auto=(1<<0),Essential=(1<<3),Important=(1<<4)};
-      enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1)};
+      enum PkgFFlags {NotSource=(1<<0),NotAutomatic=(1<<1),ButAutomaticUpgrades=(1<<2)};
    };
    
    protected:
    };
    
    protected:
@@ -215,6 +215,7 @@ class pkgCache                                                              /*{{{*/
 private:
    bool MultiArchEnabled;
    PkgIterator SingleArchFindPkg(const string &Name);
 private:
    bool MultiArchEnabled;
    PkgIterator SingleArchFindPkg(const string &Name);
+   inline char const * const NativeArch() const;
 };
                                                                        /*}}}*/
 // Header structure                                                    /*{{{*/
 };
                                                                        /*}}}*/
 // Header structure                                                    /*{{{*/
@@ -505,9 +506,9 @@ struct pkgCache::Version
        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
        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;
+       be co-installed on the system */
+   /* FIXME: A bitflag would be better with the next abibreak… */
+   enum {None, All, Foreign, Same, Allowed, AllForeign, AllAllowed} MultiArch;
 
    /** \brief references all the PackageFile's that this version came from
 
 
    /** \brief references all the PackageFile's that this version came from
 
@@ -649,6 +650,11 @@ struct pkgCache::StringItem
    map_ptrloc NextItem;      // 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() 
 #include <apt-pkg/cacheiterators.h>
 
 inline pkgCache::GrpIterator pkgCache::GrpBegin()