summaryrefslogtreecommitdiff
path: root/src/reason_fragment.cc
diff options
context:
space:
mode:
authorDaniel Burrows <dburrows@debian.org>2007-10-23 18:36:10 -0700
committerDaniel Burrows <dburrows@debian.org>2007-10-23 18:36:10 -0700
commite2ed1136b039a7da0149ddc9511d462cfd4b3d21 (patch)
tree10fc0403e3f877bb30cd0b24061dffc72c8de8b2 /src/reason_fragment.cc
parent82143d468115485fc1e124d15e7c4e979c5876f3 (diff)
downloadaptitude-e2ed1136b039a7da0149ddc9511d462cfd4b3d21.tar.gz
Apply the patch from Ian Jackson and Michael Vogt to get proper support
for the new dpkg "Breaks" field.
Diffstat (limited to 'src/reason_fragment.cc')
-rw-r--r--src/reason_fragment.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/reason_fragment.cc b/src/reason_fragment.cc
index de828403..caca79cf 100644
--- a/src/reason_fragment.cc
+++ b/src/reason_fragment.cc
@@ -36,6 +36,8 @@ fragment *depname_frag(pkgCache::DepIterator dep)
style_attrs_on(A_BOLD));
case pkgCache::Dep::Conflicts: return text_fragment(_("conflicts with"),
style_attrs_on(A_BOLD));
+ case pkgCache::Dep::DpkgBreaks: return text_fragment(_("breaks"),
+ style_attrs_on(A_BOLD));
case pkgCache::Dep::Replaces: return text_fragment(_("replaces"));
case pkgCache::Dep::Obsoletes: return text_fragment(_("obsoletes"));
}
@@ -240,7 +242,7 @@ fragment *dep_singlefrag(pkgCache::PkgIterator pkg,
verfrag,
prvfrag(dep.TargetPkg(),
dep.ParentPkg(),
- dep->Type==pkgCache::Dep::Conflicts),
+ is_conflict(dep->Type)),
available?"":(string(" [")+_("UNAVAILABLE")+"]").c_str());
}
@@ -485,7 +487,7 @@ fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
fragments.push_back(wrapbox(fragf(_("The following packages conflict with %B%s%b and will be broken by its installation:"),
pkg.Name())));
else
- // up/downgrade; could be either Depends or Conflicts
+ // up/downgrade; could be either Depends or Conflicts/Breaks
{
bool has_depends=false;
bool has_conflicts=false;
@@ -495,7 +497,7 @@ fragment *reason_fragment(const pkgCache::PkgIterator &pkg, bool &breakage)
for(set<reason>::const_iterator i=reasons.begin();
i!=reasons.end(); ++i)
{
- if(i->dep->Type == pkgCache::Dep::Conflicts)
+ if(is_conflict(i->dep->Type))
has_conflicts=true;
else
has_depends=true;