diff options
author | Michael Vogt <egon@bottom> | 2006-12-14 12:39:29 +0100 |
---|---|---|
committer | Michael Vogt <egon@bottom> | 2006-12-14 12:39:29 +0100 |
commit | 6ca714d55119e87a01bd475abd08e7212dcafbd0 (patch) | |
tree | 264c3a939b34f5daea19f45619686f060569f34d /apt-pkg/pkgcache.cc | |
parent | 0660506d1916f6538359f238e860804441ba24f3 (diff) | |
parent | dc4002d8c3c687e6614d01b34e4b6aa929411ea9 (diff) |
* merged the apt-breaks-iwj branch
* pulled in the other remaining ubuntu changes
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r-- | apt-pkg/pkgcache.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc index 28c972aed..7e3b9d78c 100644 --- a/apt-pkg/pkgcache.cc +++ b/apt-pkg/pkgcache.cc @@ -49,7 +49,7 @@ pkgCache::Header::Header() /* Whenever the structures change the major version should be bumped, whenever the generator changes the minor version should be bumped. */ - MajorVersion = 5; + MajorVersion = 6; MinorVersion = 0; Dirty = false; @@ -223,8 +223,8 @@ const char *pkgCache::DepType(unsigned char Type) { const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"), _("Recommends"),_("Conflicts"),_("Replaces"), - _("Obsoletes")}; - if (Type < 8) + _("Obsoletes"),_("Breaks")}; + if (Type < sizeof(Types)/sizeof(*Types)) return Types[Type]; return ""; } @@ -287,10 +287,11 @@ pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const // DepIterator::IsCritical - Returns true if the dep is important /*{{{*/ // --------------------------------------------------------------------- /* Currently critical deps are defined as depends, predepends and - conflicts. */ + conflicts (including dpkg's Breaks fields). */ bool pkgCache::DepIterator::IsCritical() { if (Dep->Type == pkgCache::Dep::Conflicts || + Dep->Type == pkgCache::Dep::DpkgBreaks || Dep->Type == pkgCache::Dep::Obsoletes || Dep->Type == pkgCache::Dep::Depends || Dep->Type == pkgCache::Dep::PreDepends) @@ -376,6 +377,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() continue; if ((Dep->Type == pkgCache::Dep::Conflicts || + Dep->Type == pkgCache::Dep::DpkgBreaks || Dep->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.ParentPkg()) continue; @@ -392,6 +394,7 @@ pkgCache::Version **pkgCache::DepIterator::AllTargets() continue; if ((Dep->Type == pkgCache::Dep::Conflicts || + Dep->Type == pkgCache::Dep::DpkgBreaks || Dep->Type == pkgCache::Dep::Obsoletes) && ParentPkg() == I.OwnerPkg()) continue; |