diff options
Diffstat (limited to 'urpm')
-rw-r--r-- | urpm/args.pm | 10 | ||||
-rw-r--r-- | urpm/cfg.pm | 8 |
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 |