# HG changeset patch # User Dan Winship # Date 1205250291 14400 # Node ID 7762db2848bf28df4fb132feb43b0b4178d72794 # Parent 00f19df51272614947ee0aa6d77a926048d9bf63 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 -r 00f19df51272 -r 7762db2848bf DEPSOLVE.txt --- a/DEPSOLVE.txt Tue Mar 11 11:43:54 2008 -0400 +++ b/DEPSOLVE.txt Tue Mar 11 11:44:51 2008 -0400 @@ -25,23 +25,26 @@ 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 @@ 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