From: Dan Winship Date: Tue, 11 Mar 2008 15:44:51 +0000 (-0400) Subject: update to deal with obsoletes better X-Git-Tag: 0.1~200 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=2d1338c190a42c96ef3c4174aa9fec406ca16d82;p=razor2.git%2F.git update to deal with obsoletes better when looking for a package "foo" to install/update, we have to look not just for a package named "foo", but also any package that obsoletes+provides "foo". So redo the algorithm to satisfy *all* installs/removes from the property list, so now we don't need to walk the package list at all. --- diff --git a/DEPSOLVE.txt b/DEPSOLVE.txt index e43e118..8ff8f25 100644 --- a/DEPSOLVE.txt +++ b/DEPSOLVE.txt @@ -25,23 +25,26 @@ means the packages break down into four categories: Depsolver: - Create new razor_transaction_packages ("rtp"s) for each - requested install or remove. + requested install or remove. These will be "unresolved", because + we haven't yet found the razor_packages that correspond to them. - while there are new rtps: - - qsort the new rtps + - sort the new rtps - - Walk the system package list, upstream package list, and new - rtps in parallel. For each new INSTALL/FORCED_UPDATE rtp, - set the "new_package" field and the appropriate bit in the - upstream bit array. (For any not-found packages, set an - UNAVAILABLE error.) For each new rtp of any type (INSTALL, - REMOVE, FORCED_UPDATE, OBSOLETED), if there's a matching - system package, set the "old_package" field and clear the - appropriate bit in the system bit array. + - Walk the system property list, upstream property list, and + new rtp list in parallel, and: - - Walk the system and upstream property lists in parallel, - and: + - For each uninstalled PROVIDES: + + - If the property is a valid package name (that is, + either it's a package providing its own name, or it + has a matching OBSOLETES), and it matches the name + of a new rtp of type INSTALL or FORCED_UPDATE with + an unresolved new_package, then set the rtp's + new_package to point to the package providing this + property and set the appropriate bit in the upstream + bit array. - For each to-be-installed non-file REQUIRES: @@ -138,6 +141,16 @@ Depsolver: that PROVIDES that property. If so, we have a CONTRADICTION error. + + - For each installed PROVIDES: + + - If the property is a valid package name (that is, + it's a package providing its own name), and it + matches the name of a new rtp with an unresolved + old_package, then set the rtp's old_package to point + to the package providing this property and clear the + appropriate bit in the system bit array. + - For each to-be-removed PROVIDES: - If there's also an identical to-be-installed