The following commit has been merged in the master branch:
commit c5eddb898395743571e2fa88fea0016700bdecc6
Author: Ian Jackson <[EMAIL PROTECTED]>
Date:   Thu Nov 1 20:00:04 2007 +0000

    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.

diff --git a/ChangeLog b/ChangeLog
index 927e2e6..279b648 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-03-09  Ian Jackson  <[EMAIL PROTECTED]>
 
+       * 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  <[EMAIL PROTECTED]>
+
        * dselect/pkgdepcon.cc (packagelist::deppossatisfied): The new rule
        is that a Conflicts is violated if the target package is installed
        or to be error-preserved ie would_like_to_install() != 0 - except
diff --git a/debian/changelog b/debian/changelog
index 49262d2..7cf9263 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 72232bd..b0d7a33 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

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to