summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/C/urpmf.85
-rw-r--r--urpm/args.pm1
-rwxr-xr-xurpmf25
3 files changed, 9 insertions, 22 deletions
diff --git a/man/C/urpmf.8 b/man/C/urpmf.8
index fe67b8e2..8b193238 100644
--- a/man/C/urpmf.8
+++ b/man/C/urpmf.8
@@ -50,9 +50,6 @@ Prints and searches through the Obsoletes tags.
Prints and searches through the Packager tag.
.IP "\fB\--provides\fP"
Prints and searches through the Provides tags.
-.IP "\fB\--quiet\fP"
-Do not print tag name (default if no tag given on command line, incompatible
-with interactive mode).
.IP "\fB\--requires\fP"
Prints and searches through the Requires tag.
.IP "\fB\--size\fP"
@@ -78,8 +75,6 @@ Verbose mode. urpmf will emit various messages related to the parsing of hdlist
files for your media.
.IP "\fB-i\fP"
Ignore case distinctions in any patterns.
-.IP "\fB-q\fP"
-Synonym of \fB--quiet\fP.
.IP "\fB-f\fP"
Print version, release and arch along with name of package.
.IP "\fB-m\fP"
diff --git a/urpm/args.pm b/urpm/args.pm
index 47306120..7d8b75b1 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -153,7 +153,6 @@ my %options_spec = (
obsoletes => \$::params{obsoletes},
packager => \$::params{packager},
provides => \$::params{provides},
- 'quiet|q' => \$::quiet,
requires => \$::params{requires},
size => \$::params{size},
sourcerpm => \$::params{sourcerpm},
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");