summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-12-06 10:55:58 +0000
committerFrancois Pons <fpons@mandriva.com>2001-12-06 10:55:58 +0000
commit86f61ad423dbf3b0e45ed770628fea640b673dc8 (patch)
tree3f03bffb681b39666952d618fa722354bc61b690 /urpm.pm
parentab071d4d09253a8763fffeddcc24be13d0698da6 (diff)
downloadurpmi-86f61ad423dbf3b0e45ed770628fea640b673dc8.tar
urpmi-86f61ad423dbf3b0e45ed770628fea640b673dc8.tar.gz
urpmi-86f61ad423dbf3b0e45ed770628fea640b673dc8.tar.bz2
urpmi-86f61ad423dbf3b0e45ed770628fea640b673dc8.tar.xz
urpmi-86f61ad423dbf3b0e45ed770628fea640b673dc8.zip
fixes -p ...
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm17
1 files changed, 7 insertions, 10 deletions
diff --git a/urpm.pm b/urpm.pm
index 1bbc2095..2581f1b5 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -1067,15 +1067,12 @@ sub search_packages {
if ($options{use_provides}) {
#- try to search through provides.
- if (my $provide_v = $urpm->{params}{provides}{$v}) {
- if (scalar(keys %$provide_v) == 1 &&
- $urpm->{params}{info}{$provide_v->[0]} &&
- defined $urpm->{params}{info}{$provide_v->[0]}{id}) {
- #- we assume that if the there is only one package providing the resource exactly,
- #- this should be the best one that is described.
- $exact{$v} = $urpm->{params}{info}{$provide_v->[0]}{id};
- next;
- }
+ if (my @l = grep { defined $_ } map { $_ && $_->{id} } map { $urpm->{params}{info}{$_} }
+ keys %{$urpm->{params}{provides}{$v} || {}}) {
+ #- we assume that if the there is at least one package providing the resource exactly,
+ #- this should be the best ones that is described.
+ $exact{$v} = join '|', @l;
+ next;
}
foreach (keys %{$urpm->{params}{provides}}) {
@@ -1264,7 +1261,7 @@ sub filter_minimal_packages_to_upgrade {
#- or we have to use synthesis file.
my @synthesis = map { "$urpm->{statedir}/synthesis.$_->{hdlist}" } grep { ! $_->{ignore} } @{$urpm->{media} || []};
if (grep { ! -r $_ || ! -s $_ } @synthesis) {
- $urpm->{log}(_("unable to find all synthesis file, using parsehdlist server"));
+ $urpm->{error}(_("unable to find all synthesis file, using parsehdlist server"));
pipe INPUT, OUTPUT_CHILD;
pipe INPUT_CHILD, OUTPUT;
$pid = fork();