summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-08-27 17:31:40 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-09-07 03:23:29 +0200
commit8150e04f7c49e5b00793c05322730053b6e357c1 (patch)
treec1b27d6908c0a9867b1bf6c3cf08a4914ca53a84 /urpm
parentbc7e830670503a7b51e5a89aedbbcbb78e14abc8 (diff)
downloadurpmi-8150e04f7c49e5b00793c05322730053b6e357c1.tar
urpmi-8150e04f7c49e5b00793c05322730053b6e357c1.tar.gz
urpmi-8150e04f7c49e5b00793c05322730053b6e357c1.tar.bz2
urpmi-8150e04f7c49e5b00793c05322730053b6e357c1.tar.xz
urpmi-8150e04f7c49e5b00793c05322730053b6e357c1.zip
rename 'no-suggests' option as 'no-recommends'
keep --no-suggests but with a warning
Diffstat (limited to 'urpm')
-rw-r--r--urpm/args.pm10
-rw-r--r--urpm/cfg.pm8
2 files changed, 13 insertions, 5 deletions
diff --git a/urpm/args.pm b/urpm/args.pm
index 1f43cb49..c6a05e52 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -120,8 +120,12 @@ my %options_spec = (
suggests => sub {
$urpm->{fatal}(1, "Use --allow-suggests instead of --suggests");
},
- 'allow-suggests' => sub { $urpm->{options}{'no-suggests'} = 0 },
- 'no-suggests' => sub { $urpm->{options}{'no-suggests'} = 1 },
+ 'allow-suggests' => 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";
+ $urpm->{options}{'no-recommends'} = 1;
+ },
'allow-nodeps' => sub { $urpm->{options}{'allow-nodeps'} = 1 },
'allow-force' => sub { $urpm->{options}{'allow-force'} = 1 },
'downgrade' => sub { $urpm->{options}{downgrade} = 1 },
@@ -418,7 +422,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-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-suggests', 'auto-orphans')
{
$options_spec{urpmq}{$k} = $options_spec{urpmi}{$k};
}
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index f5f292ba..f088ba04 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -96,7 +96,7 @@ sub expand_line {
return $line;
}
-my $no_para_option_regexp = 'update|ignore|synthesis|noreconfigure|no-suggests|no-media-info|static|virtual|disable-certificate-check';
+my $no_para_option_regexp = 'update|ignore|synthesis|noreconfigure|no-recommends|no-suggests|no-media-info|static|virtual|disable-certificate-check';
sub load_config_raw {
my ($file, $b_norewrite) = @_;
@@ -164,8 +164,12 @@ sub load_config_raw {
} elsif (/^(hdlist|synthesis)$/) {
# ignored, kept for compatibility
} elsif (/^($no_para_option_regexp)$/) {
+ my $opt = $1;
+ if ($opt =~ s/no-suggests/no-recommends/) { # COMPAT
+ warn "WARNING: --no-suggests is deprecated. Use --no-recommends instead\n" if s/no-suggests/no-recommends/; # COMPAT
+ }
#- positive flags
- $block->{$1} = 1;
+ $block->{$opt} = 1;
} elsif (my ($no, $k, $v) =
/^(no-)?(
verify-rpm