summaryrefslogtreecommitdiffstats
path: root/urpm/args.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-04-03 07:16:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-04-03 07:16:51 +0000
commite738cf3bc429c7018726b323f142344bbc005ca4 (patch)
tree901ff94c8c315f64ea8f7c8a5406c343ec82f3bc /urpm/args.pm
parent8110c37637ed24782afa1bfe7bbb0f32a8029128 (diff)
downloadurpmi-e738cf3bc429c7018726b323f142344bbc005ca4.tar
urpmi-e738cf3bc429c7018726b323f142344bbc005ca4.tar.gz
urpmi-e738cf3bc429c7018726b323f142344bbc005ca4.tar.bz2
urpmi-e738cf3bc429c7018726b323f142344bbc005ca4.tar.xz
urpmi-e738cf3bc429c7018726b323f142344bbc005ca4.zip
- urpmq:
o --suggests is currently misleading, introduce --allow-suggests and explain the user that --suggests really means --allow-suggests (#39726)
Diffstat (limited to 'urpm/args.pm')
-rw-r--r--urpm/args.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index d7acf2f8..83561845 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -111,7 +111,12 @@ my %options_spec = (
force => \$::force,
justdb => \$options{justdb},
replacepkgs => \$options{replacepkgs},
- 'suggests!' => sub { $urpm->{options}{'no-suggests'} = !$_[1] },
+ suggests => sub {
+ $urpm->{error}("option --suggests currently means --allow-suggests, but it may change");
+ $urpm->{options}{'no-suggests'} = 0;
+ },
+ 'allow-suggests' => sub { $urpm->{options}{'no-suggests'} = 0 },
+ 'no-suggests' => sub { $urpm->{options}{'no-suggests'} = 1 },
'allow-nodeps' => sub { $urpm->{options}{'allow-nodeps'} = 1 },
'allow-force' => sub { $urpm->{options}{'allow-force'} = 1 },
'parallel=s' => \$::parallel,
@@ -242,6 +247,12 @@ my %options_spec = (
provides => \$options{provides},
sourcerpm => \$options{sourcerpm},
'summary|S' => \$options{summary},
+ suggests => sub {
+ $urpm->{error}("--suggests currently means --allow-suggests");
+ $urpm->{options}{'no-suggests'} = 0;
+ },
+ 'allow-suggests' => sub { $urpm->{options}{'no-suggests'} = 1 },
+ 'no-suggests' => sub { $urpm->{options}{'no-suggests'} = 1 },
'list-media:s' => sub { $options{list_media} = $_[1] || 'all' },
'list-url' => \$options{list_url},
'list-nodes' => \$options{list_nodes},
@@ -404,7 +415,7 @@ foreach my $k ("help|h", "version", "no-locales", "test!", "force", "root=s", "u
{
$options_spec{urpme}{$k} = $options_spec{urpmi}{$k};
}
-foreach my $k ("root=s", "nolock", "use-distrib=s", "skip=s", "prefer=s", "synthesis=s", 'suggests!')
+foreach my $k ("root=s", "nolock", "use-distrib=s", "skip=s", "prefer=s", "synthesis=s", 'suggests', 'no-suggests', 'allow-suggests')
{
$options_spec{urpmq}{$k} = $options_spec{urpmi}{$k};
}