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 --- NEWS | 1 + urpm/args.pm | 9 ++++++--- urpmi | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 8c72a94b..484dc396 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ - rpm-4.12 support: o rename 'no_suggests' parameter as 'no_recommends' + o rename '--allow-suggests' option as '--allow-recommends' o rename '--no-suggests' option as '--no-recommends' Version 7.32 - 5 September 2014 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}; } diff --git a/urpmi b/urpmi index 203dce9b..786b9e78 100755 --- a/urpmi +++ b/urpmi @@ -102,7 +102,7 @@ sub usage () { dependencies checking. ") . N(" --allow-force - allow asking user to install packages without dependencies checking and integrity. -") . N(" --allow-suggests - auto select \"suggested\" packages. +") . N(" --allow-recommends - auto select \"recommended\" packages. ") . N(" --parallel - distributed urpmi across machines of alias. ") . N(" --root - use another root for rpm installation. ") . N(" --urpmi-root - use another root for urpmi db & rpm installation. -- cgit v1.2.1