summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-08 07:58:05 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-08 07:58:05 +0000
commit896c30beccf1bff0a8acb1e78850eeae36419d28 (patch)
treef6a051dbaea28e5591bc1e1e75d5f7c50f24effc
parent501f41944fdaebbd649a7f9d12e9b58ee7c14eba (diff)
downloadurpmi-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--NEWS4
-rw-r--r--pod/urpmq.8.pod4
-rw-r--r--urpm/args.pm11
-rw-r--r--urpmi.bash-completion2
-rwxr-xr-xurpmq4
5 files changed, 15 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index 1aac249f..84f2f55f 100644
--- a/NEWS
+++ b/NEWS
@@ -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 \
diff --git a/urpmq b/urpmq
index e6b46707..47d7815f 100755
--- a/urpmq
+++ b/urpmq
@@ -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) {