summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-02-18 16:56:32 +0000
committerFrancois Pons <fpons@mandriva.com>2002-02-18 16:56:32 +0000
commit43ff46006670a64ccb1ce2b5269e949051fa37fa (patch)
tree34fa62ff283c958511657f0137ad92312a33c72a /urpm.pm
parentcf0f5fa275d4b57b3472795d1a6a746ba489b198 (diff)
downloadurpmi-43ff46006670a64ccb1ce2b5269e949051fa37fa.tar
urpmi-43ff46006670a64ccb1ce2b5269e949051fa37fa.tar.gz
urpmi-43ff46006670a64ccb1ce2b5269e949051fa37fa.tar.bz2
urpmi-43ff46006670a64ccb1ce2b5269e949051fa37fa.tar.xz
urpmi-43ff46006670a64ccb1ce2b5269e949051fa37fa.zip
3.3-9mdk
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/urpm.pm b/urpm.pm
index 68719746..0126d55d 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1603,7 +1603,7 @@ sub filter_packages_to_upgrade {
}
}
- $provides{$pkg->{name}} = undef; #"$pkg->{name}-$pkg->{version}-$pkg->{release}";
+ $selected{$pkg->{name}} = undef;
}
#- iterate over requires of the packages, register them.
@@ -1615,11 +1615,13 @@ sub filter_packages_to_upgrade {
$provides{$_} ||= undef;
unless ($options{keep_alldeps}) {
my $check_pkg = sub {
- $o and $n eq $_[0]{name} || return;
- (!$v || eval(rpmtools::version_compare($_[0]{version}, $v) . $o . 0)) &&
- (!$r || rpmtools::version_compare($_[0]{version}, $v) != 0 ||
- eval(rpmtools::version_compare($_[0]{release}, $r) . $o . 0)) or return;
- $provides{$_} = "$_[0]{name}-$_[0]{version}-$_[0]{release}";
+ my ($p) = @_;
+ exists $selected{$p->{name}} and return;
+ $o and $n eq $p->{name} || return;
+ (!$v || eval(rpmtools::version_compare($p->{version}, $v) . $o . 0)) &&
+ (!$r || rpmtools::version_compare($p->{version}, $v) != 0 ||
+ eval(rpmtools::version_compare($p->{release}, $r) . $o . 0)) or return;
+ $provides{$_} = "$p->{name}-$p->{version}-$p->{release}";
};
rpmtools::db_traverse_tag($db, $n =~ m|^/| ? 'path' : 'whatprovides', [ $n ],
[ qw (name version release) ], $check_pkg);
@@ -1672,7 +1674,6 @@ 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}) {
- exists $selected{$n} and next;
#- a virtual provides exists with a specific version and maybe release.
#- try to resolve.
foreach (@{$pkg->{provides}}) {