aboutsummaryrefslogtreecommitdiffstats
path: root/grpmi
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-09-05 10:00:57 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-09-05 10:00:57 +0000
commit59e98d059fb60c1e01b67165ca4432e5cc295c98 (patch)
treeded1ff28ca1a4ef3b9b4159747fedabd55d063d7 /grpmi
parentb45fb594aa17b6d2437f8e2d63b8932ea66432a8 (diff)
downloadrpmdrake-59e98d059fb60c1e01b67165ca4432e5cc295c98.tar
rpmdrake-59e98d059fb60c1e01b67165ca4432e5cc295c98.tar.gz
rpmdrake-59e98d059fb60c1e01b67165ca4432e5cc295c98.tar.bz2
rpmdrake-59e98d059fb60c1e01b67165ca4432e5cc295c98.tar.xz
rpmdrake-59e98d059fb60c1e01b67165ca4432e5cc295c98.zip
flepied wants grpmi to abort when conflicts are detected
Diffstat (limited to 'grpmi')
-rwxr-xr-xgrpmi/grpmi.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/grpmi/grpmi.pl b/grpmi/grpmi.pl
index 06af2ac1..b73afe05 100755
--- a/grpmi/grpmi.pl
+++ b/grpmi/grpmi.pl
@@ -77,6 +77,7 @@ $mainw->{rwindow}->set_position('center');
$mainw->sync;
my $exitstatus = -1;
+my $forced_exitstatus;
# -=-=-=---=-=-=---=-=-=-- download potential URL's, and verify signatures -=-=-=---=-=-=--
@@ -145,8 +146,10 @@ if (grep { /^[^-]/ } @ARGV) {
_("Conflicts were detected:
%s
-Do you want to force the install anyway?",
- join("\n", split(/\|/, $1))), 1) ? 0 : 1
+Install aborted.",
+ join("\n", split(/\|/, $1))));
+ $forced_exitstatus = -1;
+ return 1;
},
'inst-start' => sub { $install_progress++;
$label->set(_("Installing package `%s' (%s/%s)...", $1, $install_progress, $nb_installs));
@@ -178,4 +181,4 @@ if (!member('noclearcache', @grpmi_config)) {
/^\Q$cache_location/ and unlink;
}
}
-mexit $exitstatus;
+mexit($forced_exitstatus || $exitstatus);