aboutsummaryrefslogtreecommitdiffstats
path: root/URPM/Resolve.pm
diff options
context:
space:
mode:
Diffstat (limited to 'URPM/Resolve.pm')
-rw-r--r--URPM/Resolve.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/URPM/Resolve.pm b/URPM/Resolve.pm
index 0e6041b..0717e5d 100644
--- a/URPM/Resolve.pm
+++ b/URPM/Resolve.pm
@@ -312,8 +312,9 @@ sub resolve_requested {
#- all package with the same name should now be avoided except what is chosen.
$p->fullname eq $pkg->fullname or $avoided{$p->fullname} = $pkg->fullname;
} else {
- #- in case of obsoletes, keep track of what should be avoided.
- !$o || eval($p->compare($v) . $o . 0) or next;
+ #- in case of obsoletes, keep track of what should be avoided
+ #- but only if package name equals the obsolete name.
+ $p->name eq $n && (!$o || eval($p->compare($v) . $o . 0)) or next;
$avoided{$p->fullname} = $pkg->fullname;
}
}