X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/4ad8619bb1f0bf777d17c568bb7a6cf7f30aac34..e5fefea6ec93746376bf42733ee84a9fafeab764:/apt-pkg/pkgcache.cc diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 8326741ed..b1ed0129d 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -527,7 +527,10 @@ operator<<(std::ostream& out, pkgCache::PkgIterator Pkg) out << " -> " << candidate; if ( newest != "none" && candidate != newest) out << " | " << newest; - out << " > ( " << string(Pkg.Section()==0?"none":Pkg.Section()) << " )"; + if (Pkg->VersionList == 0) + out << " > ( none )"; + else + out << " > ( " << string(Pkg.VersionList().Section()==0?"unknown":Pkg.VersionList().Section()) << " )"; return out; } /*}}}*/ @@ -1039,3 +1042,9 @@ bool pkgCache::PrvIterator::IsMultiArchImplicit() const return false; } /*}}}*/ +APT_DEPRECATED APT_PURE const char * pkgCache::PkgIterator::Section() const {/*{{{*/ + if (S->VersionList == 0) + return 0; + return VersionList().Section(); +} + /*}}}*/