summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 14:22:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-10-13 14:22:49 +0000
commitbcdf10636a46f17a897d7c3ca8f9d042dd865672 (patch)
tree4b43c9d9259ab11e2d11e0ac2823b2d97a3d2cbf /urpmf
parenta89d4cb513f5df2942ec1ebf504ec1338bc9ff59 (diff)
downloadurpmi-bcdf10636a46f17a897d7c3ca8f9d042dd865672.tar
urpmi-bcdf10636a46f17a897d7c3ca8f9d042dd865672.tar.gz
urpmi-bcdf10636a46f17a897d7c3ca8f9d042dd865672.tar.bz2
urpmi-bcdf10636a46f17a897d7c3ca8f9d042dd865672.tar.xz
urpmi-bcdf10636a46f17a897d7c3ca8f9d042dd865672.zip
Some comments
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf28
1 files changed, 23 insertions, 5 deletions
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 .= '