summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 15:39:21 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 15:39:21 +0000
commit2b60c7d5ea047284ad108b08c19b59366ca5f0ed (patch)
tree62083644cd814852f3147c15e452a37fc7986c6d /urpmf
parentd2a70455175fd164ebf8f6ac2f7574d1711f56d1 (diff)
downloadurpmi-2b60c7d5ea047284ad108b08c19b59366ca5f0ed.tar
urpmi-2b60c7d5ea047284ad108b08c19b59366ca5f0ed.tar.gz
urpmi-2b60c7d5ea047284ad108b08c19b59366ca5f0ed.tar.bz2
urpmi-2b60c7d5ea047284ad108b08c19b59366ca5f0ed.tar.xz
urpmi-2b60c7d5ea047284ad108b08c19b59366ca5f0ed.zip
Remove the evil urpmf --quiet option
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf25
1 files changed, 9 insertions, 16 deletions
diff --git a/urpmf b/urpmf
index 253a3843..7ef738a0 100755
--- a/urpmf
+++ b/urpmf
@@ -46,8 +46,6 @@ usage:
") . N(" --obsoletes - print tag obsoletes: all obsoletes.
") . N(" --packager - print tag packager: packager.
") . N(" --provides - print tag provides: all provides.
-") . N(" --quiet - do not print tag name (default if no tag given on command
- line, incompatible with interactive mode).
") . N(" --requires - print tag requires: all requires.
") . N(" --size - print tag size: size.
") . N(" --sortmedia - sort media according to substrings separated by comma.
@@ -78,7 +76,6 @@ our $excludemedia = '';
our $sortmedia = '';
our $synthesis = '';
our $verbose = 0;
-our $quiet;
our $uniq = '';
our $pattern = ''; # regexp match flags ("i" or "")
our $full = ''; # -f : print rpm fullname instead of rpm name
@@ -93,13 +90,9 @@ urpm::args::parse_cmdline();
my $urpm = new urpm;
$verbose or $urpm->{log} = sub {};
-foreach (scalar(grep { defined $_ } values %params)) {
+unless (scalar(grep defined, values %params)) {
#- nothing on the command-line : default is to search on file names
- $_ == 0 and do { defined $quiet or $quiet = 1; $params{files} = 1 };
- #- only one tag : turn --quiet on
- $_ == 1 and do { defined $quiet or $quiet = 1 };
- #- else keep --quiet off
- $_ > 1 and do { defined $quiet or $quiet = 0 };
+ $params{files} = 1;
}
#- build the callback matching the expression.
@@ -123,13 +116,13 @@ foreach my $tag (qw(
url
)) {
if ($params{$tag}) {
- my $fi = $tag eq 'media' ? '$urpm::currentmedia->{name}' : '$pkg->'.$tag;
+ my $fi = $tag eq 'media' ? '$urpm::currentmedia->{name}' : '$pkg->' . $tag;
$callback .= '
- foreach my $e ('.$fi.') {
- local $_ = $pkg->'.$full.'name."'.(!$quiet && ":$tag").':$e";
- '.$expr.' or next;
- '.($uniq && 'exists $uniq{$_} and next; $uniq{$_} = undef;
- ').'print "$_\n";
+ foreach my $e (' . $fi . ') {
+ local $_ = $pkg->' . $full . 'name.":' . $tag . ':$e";
+ ' . $expr . ' or next;
+ ' . ($uniq && 'exists $uniq{$_} and next; $uniq{$_} = undef;
+ ') . 'print "$_\n";
}';
}
}
@@ -175,7 +168,7 @@ $urpm->unlock_urpmi_db;
if ($use_hdlist) {
# @hdmedia is the list of all media searched that use hdlists
my @hdmedia = grep {
- !$_->{synthesis} && !$_->{removable} && !$_->{ignore}
+ !$_->{synthesis} && !$_->{removable} && !$_->{ignore};
} @{ $urpm->{media} };
if (!@hdmedia) {
print N("Note: since no media searched uses hdlists, urpmf was unable to return any result\n");