From c5eddb898395743571e2fa88fea0016700bdecc6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 1 Nov 2007 20:00:04 +0000 Subject: [PATCH] Implement 'Breaks' properly in dselect It works just like Conflicts. This is correct since dselect only deals with packages being installed, removed or placed on hold. --- ChangeLog | 7 +++++++ debian/changelog | 2 ++ dselect/pkgdepcon.cc | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 927e2e6e..279b6483 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-03-09 Ian Jackson + + * dselect/pkgdepcon.cc (packagelist::resolvedepcon): Move dep_breaks + case after dep_conflicts so that it falls through. + (packagelist::deppossatisfied): Handle dep_breaks in the same way as + dep_conflicts. + 2008-03-09 Ian Jackson * dselect/pkgdepcon.cc (packagelist::deppossatisfied): The new rule diff --git a/debian/changelog b/debian/changelog index 49262d24..7cf92631 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ dpkg (1.14.17) UNRELEASED; urgency=low Thanks to Sean Finney. * Correct broken dselect logic for self-conflicting packages. Thanks to Ian Jackson. + * Implement 'Breaks' properly in dselect. Closes: #448946 + Thanks to Ian Jackson. [ Raphael Hertzog ] * Add a warning displayed by dpkg-genchanges if the current version is diff --git a/dselect/pkgdepcon.cc b/dselect/pkgdepcon.cc index 72232bd8..b0d7a334 100644 --- a/dselect/pkgdepcon.cc +++ b/dselect/pkgdepcon.cc @@ -221,7 +221,6 @@ int packagelist::resolvedepcon(dependency *depends) { case dep_provides: case dep_replaces: - case dep_breaks: /* FIXME: implement Breaks */ return 0; case dep_enhances: @@ -312,6 +311,7 @@ int packagelist::resolvedepcon(dependency *depends) { return r ? 2 : 0; case dep_conflicts: + case dep_breaks: if (depdebug && debug) fprintf(debug,"packagelist[%p]::resolvedepcon([%p]): conflict\n", @@ -365,7 +365,7 @@ int packagelist::deppossatisfied(deppossi *possi, perpackagestate **fixbyupgrade would= 0; } - if (possi->up->type == dep_conflicts + if ((possi->up->type == dep_conflicts || possi->up->type == dep_breaks) ? possi->up->up != possi->ed && would != 0 : would > 0) { // If it's to be installed or left installed, then either it's of -- 2.39.5