summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-04-10 13:29:25 +0000
committerFrancois Pons <fpons@mandriva.com>2002-04-10 13:29:25 +0000
commit12ff778b98e39bbf611a7cf52572978aabf58f82 (patch)
tree2b8d9f499a881a6d3d36522afb4abd5bf34b9268 /urpm.pm
parent14494b8b340e4b660a4e1acaaf57b76032f97224 (diff)
downloadurpmi-12ff778b98e39bbf611a7cf52572978aabf58f82.tar
urpmi-12ff778b98e39bbf611a7cf52572978aabf58f82.tar.gz
urpmi-12ff778b98e39bbf611a7cf52572978aabf58f82.tar.bz2
urpmi-12ff778b98e39bbf611a7cf52572978aabf58f82.tar.xz
urpmi-12ff778b98e39bbf611a7cf52572978aabf58f82.zip
another fixes on urpm library.
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm25
1 files changed, 13 insertions, 12 deletions
diff --git a/urpm.pm b/urpm.pm
index cc096a69..73157139 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1692,7 +1692,6 @@ sub filter_packages_to_upgrade {
if (my ($n, $o, $v, $r) = /^([^\s\[]*)(?:\[\*\])?(?:\s+|\[)?([^\s\]]*)\s*([^\s\-\]]*)-?([^\s\]]*)/) {
$provides{$_} and next;
- print "trying on $n ($o,$v,$r)\n" if /backend/;
foreach my $fullname (keys %{$urpm->{params}{provides}{$n} || {}}) {
exists $conflicts{$fullname} and next;
my $pkg = $urpm->{params}{info}{$fullname};
@@ -1703,17 +1702,19 @@ sub filter_packages_to_upgrade {
#- a package with the given name.
#- if an obsolete is given, it will be satisfied elsewhere. CHECK TODO
if ($n ne $pkg->{name}) {
- #- a virtual provides exists with a specific version and maybe release.
- #- try to resolve.
- foreach (@{$pkg->{provides}}) {
- if (my ($pn, $po, $pv, $pr) =
- /^([^\s\[]*)(?:\[\*\])?(?:\s+|\[)?([^\s\]]*)\s*([^\s\-\]]*)-?([^\s\]]*)/) {
- $pn eq $n or next;
- my $no = $po eq '==' ? $o : $po; #- CHECK TODO ?
- (!$pv || !$v || eval(rpmtools::version_compare($pv, $v) . $no . 0)) &&
- (!$pr || !$r || rpmtools::version_compare($pv, $v) != 0 ||
- eval(rpmtools::version_compare($pr, $r) . $no . 0)) or next;
- push @{$pre_choices{$pkg->{name}}}, $pkg;
+ unless (exists $selected{$n}) {
+ #- a virtual provides exists with a specific version and maybe release.
+ #- try to resolve.
+ foreach (@{$pkg->{provides}}) {
+ if (my ($pn, $po, $pv, $pr) =
+ /^([^\s\[]*)(?:\[\*\])?(?:\s+|\[)?([^\s\]]*)\s*([^\s\-\]]*)-?([^\s\]]*)/) {
+ $pn eq $n or next;
+ my $no = $po eq '==' ? $o : $po; #- CHECK TODO ?
+ (!$pv || !$v || eval(rpmtools::version_compare($pv, $v) . $no . 0)) &&
+ (!$pr || !$r || rpmtools::version_compare($pv, $v) != 0 ||
+ eval(rpmtools::version_compare($pr, $r) . $no . 0)) or next;
+ push @{$pre_choices{$pkg->{name}}}, $pkg;
+ }
}
}
} else {