From 3ab39b26ce27f177ac50f27d7541e683fca23638 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 7 Mar 2008 16:49:28 +0000 Subject: - do allow to promoting a pkg even if it has unsatisfied require (since the code will then fix the unsatisfied require). fixes "big transaction" (cf urpmi split-transactions--strict-require.t test_efgh()) this code was introduced long ago (*), the code has changed quite a lot, and it's hard to tell for which reason it was introduced. Maybe the check "obsoletes_overlap" replaces it for good? (*) in "r11064 | fpons | 2002-06-13", search for "try if upgrading the package will be satisfying all the requires" --- NEWS | 5 +++++ URPM/Resolve.pm | 12 ------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 9edc350..acce1cd 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,9 @@ +- do allow to promoting a pkg even if it has unsatisfied require (since the + code will then fix the unsatisfied require). fixes "big transaction" + (cf urpmi split-transactions--strict-require.t test_efgh()) + Version 3.12 - + - rpm5.org port done (by Per Øyvind Karlsen) Version 3.11 - 26 February 2008, by Pascal "Pixel" Rigaux diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 3619c62..3d3c3f8 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1078,14 +1078,6 @@ sub _compute_diff_provides_of_removed_pkg { } } -sub _no_unsatisfied_requires { - my ($urpm, $db, $state, $pkg, $n) = @_; - - my @l = unsatisfied_requires($urpm, $db, $state, $pkg, name => $n); - @l and $urpm->{debug_URPM}(" (not promoting " . $pkg->fullname . " because of @l)") if $urpm->{debug_URPM}; - @l == 0; -} - #- side-effects: none sub _find_packages_obsoleting { my ($urpm, $state, $p) = @_; @@ -1117,14 +1109,10 @@ sub _handle_diff_provides { grep { ($_->name eq $p->name ? $_->fullname ne $p->fullname : $_->obsoletes_overlap($p->name . " == " . $p->epoch . ":" . $p->version . "-" . $p->release)) && (!strict_arch($urpm) || strict_arch_check($p, $_)) - && _no_unsatisfied_requires($urpm, $db, $state, $_, $n) } @packages; if (!@packages) { @packages = _find_packages_obsoleting($urpm, $state, $p); - @packages = grep { - _no_unsatisfied_requires($urpm, $db, $state, $_, $n); - } @packages; } if (@packages) { -- cgit v1.2.1