diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 07:58:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-08 07:58:05 +0000 |
commit | 896c30beccf1bff0a8acb1e78850eeae36419d28 (patch) | |
tree | f6a051dbaea28e5591bc1e1e75d5f7c50f24effc | |
parent | 501f41944fdaebbd649a7f9d12e9b58ee7c14eba (diff) | |
download | urpmi-896c30beccf1bff0a8acb1e78850eeae36419d28.tar urpmi-896c30beccf1bff0a8acb1e78850eeae36419d28.tar.gz urpmi-896c30beccf1bff0a8acb1e78850eeae36419d28.tar.bz2 urpmi-896c30beccf1bff0a8acb1e78850eeae36419d28.tar.xz urpmi-896c30beccf1bff0a8acb1e78850eeae36419d28.zip |
- urpmq:
o --suggests now displays the suggested packages, see --allow-suggests for
previous behaviour (#39726)
- fixing duplicated setting of options in args.pm
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | pod/urpmq.8.pod | 4 | ||||
-rw-r--r-- | urpm/args.pm | 11 | ||||
-rw-r--r-- | urpmi.bash-completion | 2 | ||||
-rwxr-xr-x | urpmq | 4 |
5 files changed, 15 insertions, 10 deletions
@@ -1,3 +1,7 @@ +- urpmq: + o --suggests now displays the suggested packages, see --allow-suggests for + previous behaviour (#39726) + Version 6.0 - 8 July 2008, by Pascal "Pixel" Rigaux - all tools: diff --git a/pod/urpmq.8.pod b/pod/urpmq.8.pod index 959044cc..70123da0 100644 --- a/pod/urpmq.8.pod +++ b/pod/urpmq.8.pod @@ -225,6 +225,10 @@ Prints the package provides. Prints the package requires. +=item B<--suggests> + +Prints the package suggests. + =item B<--sourcerpm> Prints the sourcerpm of the package diff --git a/urpm/args.pm b/urpm/args.pm index 5b98d03a..5a41bf25 100644 --- a/urpm/args.pm +++ b/urpm/args.pm @@ -114,8 +114,7 @@ my %options_spec = ( justdb => \$options{justdb}, replacepkgs => \$options{replacepkgs}, suggests => sub { - $urpm->{error}("option --suggests currently means --allow-suggests, but it may change"); - $urpm->{options}{'no-suggests'} = 0; + $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 }, @@ -247,11 +246,9 @@ my %options_spec = ( sourcerpm => \$options{sourcerpm}, 'summary|S' => \$options{summary}, suggests => sub { - $urpm->{error}("--suggests currently means --allow-suggests"); - $urpm->{options}{'no-suggests'} = 0; + $urpm->{error}("--suggests now displays the suggested packages, see --allow-suggests for previous behaviour"); + $options{suggests} = 1; }, - '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}, @@ -415,7 +412,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', 'no-suggests', 'allow-suggests', 'auto-orphans') +foreach my $k ("root=s", "nolock", "use-distrib=s", "skip=s", "prefer=s", "synthesis=s", 'no-suggests', 'allow-suggests', 'auto-orphans') { $options_spec{urpmq}{$k} = $options_spec{urpmi}{$k}; } diff --git a/urpmi.bash-completion b/urpmi.bash-completion index d244d282..b466adb5 100644 --- a/urpmi.bash-completion +++ b/urpmi.bash-completion @@ -165,7 +165,7 @@ _urpmq() --sortmedia --synthesis --auto-select --auto-orphans \ --no-suggests --fuzzy --keep --nokeep \ --list --list-url --list-media --list-nodes --list-aliases \ - --src --sources --provides --requires --summary --sourcerpm --force --parallel --wget --curl --prozilla \ + --src --sources --provides --requires --suggests --summary --sourcerpm --force --parallel --wget --curl --prozilla \ --changelog --conflicts --proxy --proxy-user --env --dump-config \ --whatprovides --whatrequires --whatrequires-recursive \ --skip --prefer \ @@ -82,6 +82,7 @@ usage: ") . N(" --conflicts - print conflicts. ") . N(" --provides - print provides. ") . N(" --requires - print requires. +") . N(" --suggests - print suggests. ") . N(" --sourcerpm - print sourcerpm. ") . N(" --summary, -S - print summary. ") . N(" --verbose, -v - verbose mode. @@ -490,8 +491,7 @@ if ($options{list_aliases}) { } } exit 0; - } elsif ($options{provides} || $options{requires} || $options{conflicts}) { - my $get = $options{provides} ? 'provides' : $options{requires} ? 'requires' : 'conflicts'; + } elsif (my ($get) = grep { $options{$_} } 'provides', 'requires', 'conflicts', 'suggests') { my @l = uniq_ { scalar $_->fullname } map { $urpm->{depslist}[$_] } map { split /\|/, $_ } keys %{$state->{selected}}; foreach my $pkg (@l) { if (@l > 1) { |