]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheiterators.h
add {contrib,non-free}/{metapackages,oldlibs} to section specialhandling
[apt.git] / apt-pkg / cacheiterators.h
index f8321079aee5407ecb598a002b00f97abf237cc3..48547e56431cfa31202b58d0e8978f2bc01e5ceb 100644 (file)
@@ -157,11 +157,7 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
        inline const char *Name() const { return Group().Name(); }
        // Versions have sections - and packages can have different versions with different sections
        // so this interface is broken by design. Run as fast as you can to Version.Section().
-       APT_DEPRECATED inline const char *Section() const {
-          APT_IGNORE_DEPRECATED_PUSH
-          return S->Section == 0?0:Owner->StrP + S->Section;
-          APT_IGNORE_DEPRECATED_POP
-       }
+       APT_DEPRECATED inline const char *Section() const;
        inline bool Purge() const {return S->CurrentState == pkgCache::State::Purge ||
                (S->CurrentVer == 0 && S->CurrentState == pkgCache::State::NotInstalled);}
        inline const char *Arch() const {return S->Arch == 0?0:Owner->StrP + S->Arch;}
@@ -518,5 +514,7 @@ inline pkgCache::VerFileIterator pkgCache::VerIterator::FileList() const
        {return VerFileIterator(*Owner,Owner->VerFileP + S->FileList);}
 inline pkgCache::DescFileIterator pkgCache::DescIterator::FileList() const
        {return DescFileIterator(*Owner,Owner->DescFileP + S->FileList);}
+APT_DEPRECATED inline const char * pkgCache::PkgIterator::Section() const
+       {return S->VersionList == 0 ? 0 : VersionList().Section();}
                                                                        /*}}}*/
 #endif