diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-01 14:15:34 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-03-01 14:15:34 +0000 |
commit | cb7cf0e4565d685ede4a451bb238d164b08cc85f (patch) | |
tree | 7ac3af23559e5f0c2426a7e319e399509d756ced | |
parent | 5e57870e9dbe0dcf803e421439ea4101822dd975 (diff) | |
download | urpmi-cb7cf0e4565d685ede4a451bb238d164b08cc85f.tar urpmi-cb7cf0e4565d685ede4a451bb238d164b08cc85f.tar.gz urpmi-cb7cf0e4565d685ede4a451bb238d164b08cc85f.tar.bz2 urpmi-cb7cf0e4565d685ede4a451bb238d164b08cc85f.tar.xz urpmi-cb7cf0e4565d685ede4a451bb238d164b08cc85f.zip |
Make the error "The following packages contain %s" more explicitly an error.
-rw-r--r-- | urpm.pm | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2160,12 +2160,12 @@ sub search_packages { my $pkg = $urpm->{depslist}[$_]; push @{$l{$pkg->name}}, $pkg; } - if (values(%l) == 0) { + if (values(%l) == 0 || values(%l) > 1 && !$options{all}) { $urpm->{error}(N("no package named %s", $_)); - $result = 0; - } elsif (values(%l) > 1 && !$options{all}) { - $urpm->{error}(N("The following packages contain %s: %s", - $_, "\n" . join("\n", sort { $a cmp $b } keys %l))); + values(%l) != 0 and $urpm->{error}( + N("The following packages contain %s: %s", + $_, "\n" . join("\n", sort { $a cmp $b } keys %l)) + ); $result = 0; } else { foreach (values %l) { |