From c5bf8148079ce8ac2ae6e860be574c60a5fe7440 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 2 Aug 2004 10:42:03 +0000 Subject: fixed deadlock caused with libgc1 obsoleting itself ;-) and in the case were an older package is already installed and an older package is present in urpmi db. The problems comes with a badly interpreted comparison without an operator checked. --- URPM/Resolve.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 88d655b..eafa50f 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -499,7 +499,7 @@ sub resolve_requested { my (%diff_provides); foreach ($pkg->name." < ".$pkg->epoch.":".$pkg->version."-".$pkg->release, $pkg->obsoletes) { - $pkg->name eq $_ and next; #- this package obsoletes itself ?? Ignore. + #$pkg->name eq $_ and print STDERR "avoiding same name for package ".$pkg->fullname."\n", next; #- this package obsoletes itself ?? Ignore. if (my ($n, $o, $v) = /^([^\s\[]*)(?:\[\*\])?\s*\[?([^\s\]]*)\s*([^\s\]]*)/) { #- populate avoided entries according to what is selected. foreach (keys %{$urpm->{provides}{$n} || {}}) { @@ -536,7 +536,7 @@ sub resolve_requested { if ($p->name eq $pkg->name) { #- all packages older than the current one are obsoleted, #- the others are simply removed (the result is the same). - if ($comparison > 0) { + if ($o && $comparison > 0) { #- installed package is newer #- remove this package from the list of packages to install, #- unless urpmi was invoked with --allow-force (in which -- cgit v1.2.1