summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-28 16:26:38 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-28 16:26:38 +0000
commitfd59a6a784454262d89cfe039fe4b0d00235b273 (patch)
treee118b5ea68912ff2d566fc7f9d201c19e5a5d034 /urpm
parenta92810cd4d3d5c78b4de512dfae62ba437402c0a (diff)
downloadurpmi-fd59a6a784454262d89cfe039fe4b0d00235b273.tar
urpmi-fd59a6a784454262d89cfe039fe4b0d00235b273.tar.gz
urpmi-fd59a6a784454262d89cfe039fe4b0d00235b273.tar.bz2
urpmi-fd59a6a784454262d89cfe039fe4b0d00235b273.tar.xz
urpmi-fd59a6a784454262d89cfe039fe4b0d00235b273.zip
ensure "urpmq --fuzzy" displays each packages alone on its line.
this regression was introduced in commit r231535: there is no reason search_packages should return multiple pkgs with same fullname when using {provides}, and should not otherwise a "better" fix could be done in urpmq. nb: "urpmq -d basesystem" still use "|" for choices, but "urpmq --sources -d basesystem" doesn't, so it's quite broken...
Diffstat (limited to 'urpm')
-rw-r--r--urpm/select.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/urpm/select.pm b/urpm/select.pm
index b10a8192..10dba29b 100644
--- a/urpm/select.pm
+++ b/urpm/select.pm
@@ -80,8 +80,12 @@ sub search_packages {
my ($name2ids, $result) = _search_packages($urpm, $names, %options) or return;
foreach my $v (@$names) {
- $packages->{$name2ids->{$v}} = 1;
- foreach (split /\|/, $name2ids->{$v}) {
+ 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};
+
+ foreach (@ids) {
my $pkg = $urpm->{depslist}[$_] or next;
$urpm->{debug} and $urpm->{debug}("search_packages: found " . $pkg->fullname . " matching $v");
$pkg->set_flag_skip(0); #- reset skip flag as manually selected.