summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--urpm/select.pm8
2 files changed, 7 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 03b525e6..d76fb2bd 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@
this often used case
- urpmq:
o add --provides
+ o fix option -a : display packages of all compatible archs (#36942)
Version 5.1 - 16 January 2008, by Pascal "Pixel" Rigaux
diff --git a/urpm/select.pm b/urpm/select.pm
index bc1ca996..a0201426 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -83,7 +83,7 @@ sub search_packages {
my @ids = split /\|/, $name2ids->{$v};
#- in case we have a substring match, we want individual selection (for urpmq --fuzzy)
- $packages->{$_} = 1 foreach $result eq 'substring' ? @ids : $name2ids->{$v};
+ $packages->{$_} = 1 foreach $result eq 'substring' || $options{all} ? @ids : $name2ids->{$v};
foreach (@ids) {
my $pkg = $urpm->{depslist}[$_] or next;
@@ -120,8 +120,12 @@ sub _search_packages {
delete $compats{0}; #- means not compatible
#- if there are pkgs matching arch, prefer them
+ if (%compats && !$options{all}) {
+ my $best_arch = min(keys %compats);
+ %compats = ($best_arch => $compats{$best_arch});
+ }
if (%compats) {
- @l = (@$noarch, @{$compats{min(keys %compats)}});
+ @l = (@$noarch, map { @$_ } values %compats);
}
#- we assume that if there is at least one package providing