summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-09 17:11:15 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-09 17:11:15 +0000
commit4a5a9aa1ab7a6d12c20dec95a95e596d900d356f (patch)
tree62e378914b81050862aa820daa5d133de5a69b71 /urpm.pm
parent07f0daa272b38f02ac616d5a375d95b4c71ed54d (diff)
downloadurpmi-4a5a9aa1ab7a6d12c20dec95a95e596d900d356f.tar
urpmi-4a5a9aa1ab7a6d12c20dec95a95e596d900d356f.tar.gz
urpmi-4a5a9aa1ab7a6d12c20dec95a95e596d900d356f.tar.bz2
urpmi-4a5a9aa1ab7a6d12c20dec95a95e596d900d356f.tar.xz
urpmi-4a5a9aa1ab7a6d12c20dec95a95e596d900d356f.zip
*** empty log message ***
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/urpm.pm b/urpm.pm
index e5c92d12..5304a4a4 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -801,8 +801,7 @@ sub search_packages {
my $info = $urpm->{params}{info}{$_};
my $pack = $info->{name} .'-'. $info->{version} .'-'. $info->{release};
- $pack =~ /^$qv-[^-]+-[^-]+$/ and $exact{$v} = $info;
- $pack =~ /^$qv-[^-]+$/ and $exact{$v} = $info;
+ $pack =~ /^$qv(?:-[^-]+)?$/ and $exact{$v} = $info, next;
$pack =~ /$qv/ and push @{$found{$v}}, $info;
$pack =~ /$qv/i and push @{$foundi{$v}}, $info;
}
@@ -1048,7 +1047,7 @@ sub filter_minimal_packages_to_upgrade {
};
my ($db, @packages) = (rpmtools::db_open(''), keys %$packages);
- my ($id, %provides, %installed);
+ my ($id, %installed);
#- at this level, compute global closure of what is requested, regardless of
#- choices for which all package in the choices are taken and their dependancies.
@@ -1075,7 +1074,10 @@ sub filter_minimal_packages_to_upgrade {
#- search for package that will be upgraded, and check the difference
#- of provides to see if something will be altered and need to be upgraded.
#- this is bogus as it only take care of == operator if any.
- my %diffprovides;
+ #- defining %provides here could slow the algorithm but it solves multi-pass
+ #- where a provides is A and after A == version-release, when A is already
+ #- installed.
+ my (%diffprovides, %provides);
rpmtools::db_traverse_tag($db,
'name', [ $pkg->{name} ],
[ qw(name version release sense provides) ], sub {