From bcdf10636a46f17a897d7c3ca8f9d042dd865672 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 13 Oct 2005 14:22:49 +0000 Subject: Some comments --- urpmf | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'urpmf') diff --git a/urpmf b/urpmf index 4071406e..96c892fc 100755 --- a/urpmf +++ b/urpmf @@ -79,8 +79,8 @@ our $synthesis = ''; our $verbose = 0; our $quiet; our $uniq = ''; -our $pattern = ''; -our $full = ''; +our $pattern = ''; # regexp match flags ("i" or "") +our $full = ''; # -f : print rpm fullname instead of rpm name our $env; our (%params, %uniq); @@ -92,16 +92,34 @@ my $urpm = new urpm; $verbose or $urpm->{log} = sub {}; foreach (scalar(grep { defined $_ } values %params)) { - # default is to search on file names + #- 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 }; } #- build the callback matching the expression. my $callback = 'sub { my ($urpm, $pkg) = @_; '; #- it is a good start for a sub, no ;-) -foreach (qw(filename group size epoch summary description sourcerpm packager buildhost url - provides requires files conflicts obsoletes media)) { +foreach (qw( + buildhost + conflicts + description + epoch + filename + files + group + media + obsoletes + packager + provides + requires + size + sourcerpm + summary + url +)) { if ($params{$_}) { my $fi = $_ eq 'media' ? '$urpm::currentmedia->{name}' : '$pkg->'.$_; $callback .= ' -- cgit v1.2.1