From a03cc8fca2f2910417d63086bc8b84081d588042 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 28 Jul 2009 13:14:07 +0000 Subject: _handle_conflicts: check all provides for conflicts, not just package name Patch by Anssi Hannula, fixes bug #52135 If package a has "Conflicts: x" and b has "Provides: x", installing both at the same time creates a failing transaction (instead of producing the "cannot install a (or b), continue?") as perl-URPM does not detect the conflict, as it just checks the conflicts on the package name (it does the correct thing with installed packages, though). _handle_conflicts: call _set_rejected_from if any provides match the conflict, instead of just package name --- URPM/Resolve.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm index 1f23552..9aa7064 100644 --- a/URPM/Resolve.pm +++ b/URPM/Resolve.pm @@ -1048,7 +1048,7 @@ sub _handle_conflicts { if (my ($n, $o, $v) = property2name_op_version($_)) { foreach my $p ($urpm->packages_providing($n)) { $pkg == $p and next; - $p->name eq $n && (!$o || eval($p->compare($v) . $o . 0)) or next; + $p->provides_overlap($_) or next; _set_rejected_from($state, $p, $pkg); } } -- cgit v1.2.1