]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cacheiterators.h
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
[apt.git] / apt-pkg / cacheiterators.h
index 2fdf8404ddea9667fb78acedce6370b399c38f23..513f40f17c68fcac9d53473e31741acd84b4797b 100644 (file)
@@ -160,7 +160,9 @@ class pkgCache::PkgIterator: public Iterator<Package, PkgIterator> {
 
        // Accessors
        inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}
-       inline const char *Section() const {return S->Section == 0?0:Owner->StrP + S->Section;}
+       // 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 {return S->Section == 0?0:Owner->StrP + S->Section;}
        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;}