summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--t/superuser--suggests.t11
-rw-r--r--urpm/args.pm2
3 files changed, 14 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 4c514035..ba1d71fc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- urpmi:
+ o handle --suggests (to override urpmi.cfg global option "no-suggests")
- urpmi.update:
o exit code 1 when a (selected) medium can't be updated (#35952)
o leave early with error if no medium were successfull updated
diff --git a/t/superuser--suggests.t b/t/superuser--suggests.t
index 0b38a9a7..e6caeaa3 100644
--- a/t/superuser--suggests.t
+++ b/t/superuser--suggests.t
@@ -29,6 +29,7 @@ test_c();
test_invalid();
test_upgrade();
test_d();
+test_force_suggests();
sub test_b {
test('b', ['bb'], ['suggested_b']);
@@ -103,3 +104,13 @@ sub test_d {
}
}
+sub test_force_suggests {
+ set_urpmi_cfg_global_options({ 'no-suggests' => '' });
+
+ urpmi("--auto b");
+ check_installed_and_remove('b', 'bb');
+ urpmi("--auto --suggests b");
+ check_installed_and_remove('b', 'bb', 'suggested_b');
+
+ set_urpmi_cfg_global_options({});
+}
diff --git a/urpm/args.pm b/urpm/args.pm
index 209d73bc..58cbdacd 100644
--- a/urpm/args.pm
+++ b/urpm/args.pm
@@ -102,7 +102,7 @@ my %options_spec = (
force => \$::force,
justdb => \$options{justdb},
replacepkgs => \$options{replacepkgs},
- 'no-suggests' => sub { $urpm->{options}{'no-suggests'} = 1 },
+ 'suggests!' => sub { $urpm->{options}{'no-suggests'} = !$_[1] },
'allow-nodeps' => sub { $urpm->{options}{'allow-nodeps'} = 1 },
'allow-force' => sub { $urpm->{options}{'allow-force'} = 1 },
'parallel=s' => \$::parallel,