summaryrefslogtreecommitdiffstats
path: root/urpmi
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-05 19:01:37 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-05 19:01:37 +0000
commit065fc607088c62a58dc6a8b5e8faf0c169440be7 (patch)
tree2536b008b206783cf1d496d0d076fb2cb7e2e29f /urpmi
parent91678a3bd2f6d6ae5ff9b56e62a0e79a8b87b322 (diff)
downloadurpmi-065fc607088c62a58dc6a8b5e8faf0c169440be7.tar
urpmi-065fc607088c62a58dc6a8b5e8faf0c169440be7.tar.gz
urpmi-065fc607088c62a58dc6a8b5e8faf0c169440be7.tar.bz2
urpmi-065fc607088c62a58dc6a8b5e8faf0c169440be7.tar.xz
urpmi-065fc607088c62a58dc6a8b5e8faf0c169440be7.zip
warn if --allow-force, --allow-nodeps, --force or --keep is in use (mga#3127)
Diffstat (limited to 'urpmi')
-rwxr-xr-xurpmi10
1 files changed, 10 insertions, 0 deletions
diff --git a/urpmi b/urpmi
index bd1520b2..f92f7c4d 100755
--- a/urpmi
+++ b/urpmi
@@ -595,6 +595,16 @@ foreach my $pkg (@to_install) {
}
$urpm->{nb_install} = @to_install;
+sub warn_msg {
+ my ($msg) = @_;
+ $urpm->{print}(N("WARNING: %s option is in use. Some strange problems may happen", $msg));
+}
+
+warn_msg("--allow-force") if $urpm->{options}{'allow-force'};
+warn_msg("--allow-nodeps") if $urpm->{options}{'allow-nodeps'};
+warn_msg("--force") if $urpm->{options}{force};
+warn_msg("--keep") if $urpm->{options}{keep};
+
if (!$urpm->{options}{auto} && $ask_user && $urpm->{nb_install} || $env && !$options{debug__do_not_install}) {
my $msg = $urpm->{nb_install} == 1 ? N("To satisfy dependencies, the following package is going to be installed:")
: N("To satisfy dependencies, the following packages are going to be installed:");