From d7d4a6f538362365ead3ac4fa2fa4aa2cfc6773c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 5 Sep 2014 16:15:12 +0200 Subject: rename 'allow-suggests' as 'allow-recommends' but keep an alias (with a warning) for compatibility --- urpm/args.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'urpm') diff --git a/urpm/args.pm b/urpm/args.pm index c6a05e52..ccaa8e42 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -118,9 +118,12 @@ my %options_spec = ( justdb => \$options{justdb}, replacepkgs => \$options{replacepkgs}, suggests => sub { - $urpm->{fatal}(1, "Use --allow-suggests instead of --suggests"); + $urpm->{fatal}(1, "Use --allow-recommends instead of --suggests"); }, - 'allow-suggests' => sub { $urpm->{options}{'no-recommends'} = 0 }, + 'allow-suggests' => sub { + warn "WARNING: --allow-suggests is deprecated. Use --allow-recommends instead\n"; + $urpm->{options}{'no-recommends'} = 0 }, + 'allow-recommends' => sub { $urpm->{options}{'no-recommends'} = 0 }, 'no-recommends' => sub { $urpm->{options}{'no-recommends'} = 1 }, 'no-suggests' => sub { # COMPAT warn "WARNING: --no-suggests is deprecated. Use --no-recommends instead\n"; @@ -422,7 +425,7 @@ foreach my $k ("test!", "force", "root=s", "use-distrib=s", 'env=s', { $options_spec{urpme}{$k} = $options_spec{urpmi}{$k}; } -foreach my $k ("root=s", "nolock", "use-distrib=s", "skip=s", "prefer=s", "synthesis=s", 'no-recommends', 'no-suggests', 'allow-suggests', 'auto-orphans') +foreach my $k ("root=s", "nolock", "use-distrib=s", "skip=s", "prefer=s", "synthesis=s", 'no-recommends', 'no-suggests', 'allow-recommends', 'allow-suggests', 'auto-orphans') { $options_spec{urpmq}{$k} = $options_spec{urpmi}{$k}; } -- cgit v1.2.1