summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--urpm/args.pm23
-rwxr-xr-xurpmf2
2 files changed, 17 insertions, 8 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 6dc6fb45..f9062727 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -116,17 +116,26 @@ my %options_spec = (
all => sub {
foreach my $k (qw(filename group size summary description sourcerpm
packager buildhost url provides requires files conflicts obsoletes))
- {
- $::params{$k} = 1;
- }
+ { $::params{$k} = 1; }
},
name => \$::params{filename},
- 'group|size|epoch|summary|description|sourcerpm|packager|buildhost|url|provides|requires|files|conflicts|obsoletes' => sub {
- $::params{$_[0]} = 1;
- },
+ group => \$::params{group},
+ size => \$::params{size},
+ epoch => \$::params{epoch},
+ summary => \$::params{summary},
+ description => \$::params{description},
+ sourcerpm => \$::params{sourcerpm},
+ packager => \$::params{packager},
+ buildhost => \$::params{buildhost},
+ url => \$::params{url},
+ provides => \$::params{provides},
+ requires => \$::params{requires},
+ files => \$::params{files},
+ conflicts => \$::params{conflicts},
+ obsoletes => \$::params{obsoletes},
i => sub { $::pattern = 'i' },
f => sub { $::full = 'full' },
- 'e=s' => sub { $::expr .= "($_[0])" },
+ 'e=s' => sub { $::expr .= "($_[1])" },
a => sub { $::expr .= ' && ' },
o => sub { $::expr .= ' || ' },
'<>' => sub {
diff --git a/urpmf b/urpmf
index 71b5713b..30eb4517 100755
--- a/urpmf
+++ b/urpmf
@@ -89,7 +89,7 @@ urpm::args::parse_cmdline();
my $urpm = new urpm;
$verbose or $urpm->{log} = sub {};
-foreach (scalar(keys %params)) {
+foreach (scalar(grep { defined $_ } values %params)) {
$_ == 0 and do { defined $quiet or $quiet = 1; $params{files} = 1 };
$_ == 1 and do { defined $quiet or $quiet = 1 };
$_ > 1 and do { defined $quiet or $quiet = 0 };