1.1 --- a/DEPSOLVE.txt Wed Mar 12 16:41:34 2008 -0400
1.2 +++ b/DEPSOLVE.txt Mon Jun 09 14:38:58 2008 -0400
1.3 @@ -66,6 +66,110 @@
1.4 to become slower to resolve as well...)
1.5
1.6
1.7 +THE RULES
1.8 +---------
1.9 +
1.10 +This is what we have figured out for transaction-solving rules;
1.11 +neither yum nor rpm's algorithm seems to be explained in full
1.12 +anywhere...
1.13 +
1.14 + 1. Every requested install in the initial package set must be
1.15 + satisfied as either a new install or an update:
1.16 +
1.17 + - if the requested package name is the name of an upstream
1.18 + package:
1.19 +
1.20 + - if there is not a corresponding already-installed
1.21 + package, then install the upstream package
1.22 +
1.23 + - else if the upstream package is newer than the
1.24 + already-installed package, then update the package
1.25 +
1.26 + - else it's an error (UP_TO_DATE)
1.27 +
1.28 + - else if the requested package name is the name of an
1.29 + already-installed package:
1.30 +
1.31 + - if there is an upstream package that obsoletes the
1.32 + already-installed package, then behave as though the
1.33 + user had requested that that package be installed
1.34 + instead.
1.35 +
1.36 + - else it's an error (UP_TO_DATE or INSTALL_UNAVAILABLE?)
1.37 +
1.38 + - else it's an error (INSTALL_UNAVAILABLE)
1.39 +
1.40 + 2. Every requested removal in the initial package set must be
1.41 + satisfied as a removal. If any requested package name is not
1.42 + the name of an installed package, it's an error
1.43 + (REMOVE_NOT_INSTALLED)
1.44 +
1.45 + REQUIRES processing:
1.46 +
1.47 + 3. If a package being installed or updated-to REQUIRES a property
1.48 + that is not provided by any installed or to-be-installed
1.49 + package, we need to find an installable package that provides
1.50 + that property. If we find one, install/update it. If not, it's
1.51 + an error (UNSATISFIABLE). (If we find an upstream package
1.52 + providing the property that corresponds to a system package
1.53 + that's being removed, then it's a CONTRADICTION.)
1.54 +
1.55 + 4. If an already-installed package REQUIRES a property which is
1.56 + only provided by a package that is being removed, then that
1.57 + package needs to be removed as well.
1.58 +
1.59 + 5. If an already-installed package REQUIRES a property which is
1.60 + only provided by a package that is being upgraded or obsoleted
1.61 + (to a new package which does not provide that property), then:
1.62 +
1.63 + - if there is an update for the installed package, then update
1.64 + the installed package
1.65 +
1.66 + - else if there is another installable package that provides
1.67 + the required property, then install that.
1.68 +
1.69 + - else it's an error (UNSATISFIABLE?)
1.70 +
1.71 + CONFLICTS processing
1.72 +
1.73 + 6. If a package being installed or updated-to CONFLICTS with a
1.74 + property provided by an installed package:
1.75 +
1.76 + - if there is an update for the installed package, which the
1.77 + new package does not conflict with, then update the
1.78 + installed package.
1.79 +
1.80 + - else it's an error (NEW_CONFLICT)
1.81 +
1.82 + 7. If an already-installed package CONFLICTS with a property
1.83 + provided by a to-be-installed package:
1.84 +
1.85 + - if there is an update for the installed package, which does
1.86 + not conflict with the new package, then update the installed
1.87 + package.
1.88 +
1.89 + - else it's an error (NEW_CONFLICT)
1.90 +
1.91 + 8. If a package being installed or updated-to CONFLICTS with a
1.92 + property provided by a to-be-installed package, then it's an
1.93 + error (CONTRADICTION).
1.94 +
1.95 + OBSOLETES processing. NOTE: OBSOLETES are only matched against
1.96 + package names, not against arbitrary provided properties
1.97 +
1.98 + 9. If a package being installed or updated-to OBSOLETES an
1.99 + installed package, then obsolete that package. (ie, remove it,
1.100 + but treat it as updated for purposes of dangling REQUIRES).
1.101 +
1.102 + 10. If an already-installed package OBSOLETES a to-be-installed
1.103 + package, then it's an error. (ALREADY_OBSOLETE)
1.104 +
1.105 + 11. If a package being installed or updated-to OBSOLETES another
1.106 + package being installed or updated-to, then it's an error
1.107 + (CONTRADICTION).
1.108 +
1.109 +
1.110 +
1.111 THE DEPSOLVER
1.112 -------------
1.113