summaryrefslogtreecommitdiffstats
path: root/mdkapplet-upgrade-helper
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-15 14:28:36 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-15 14:28:36 +0000
commitb07d044f1a66a271a919be82c36d0fd20ccb7002 (patch)
treeec190de2f1640aa2c2f6f788545ed6f46faab6c8 /mdkapplet-upgrade-helper
parent6602856ed202e69d34c8f458866a759a496923dd (diff)
downloadmgaonline-b07d044f1a66a271a919be82c36d0fd20ccb7002.tar
mgaonline-b07d044f1a66a271a919be82c36d0fd20ccb7002.tar.gz
mgaonline-b07d044f1a66a271a919be82c36d0fd20ccb7002.tar.bz2
mgaonline-b07d044f1a66a271a919be82c36d0fd20ccb7002.tar.xz
mgaonline-b07d044f1a66a271a919be82c36d0fd20ccb7002.zip
(upgrade) display error dialog instead of success one when we cannot
add the media
Diffstat (limited to 'mdkapplet-upgrade-helper')
-rwxr-xr-xmdkapplet-upgrade-helper16
1 files changed, 14 insertions, 2 deletions
diff --git a/mdkapplet-upgrade-helper b/mdkapplet-upgrade-helper
index 01e52f3d..37a3588d 100755
--- a/mdkapplet-upgrade-helper
+++ b/mdkapplet-upgrade-helper
@@ -123,7 +123,15 @@ sub upgrade() {
if (my $err = $@) {
log::explanations(sprintf("locking urpmi database failed: %s"), $err);
- return;
+ ugtk2::ask_warn(N("Error"),
+ N("Installation failed"),
+ '',
+ formatAlaTeX(N("Packages database is locked. Please close other applications
+working with packages database (do you have another media
+manager on another desktop, or are you currently installing
+packages as well?)."))
+ );
+ exit(1);
}
undef $urpmi_lock;
@@ -142,7 +150,11 @@ sub upgrade() {
log::explanations("restoringing urpmi configuration from $file");
cp_af($file, "$root/etc/urpmi/urpmi.cfg");
run_program::run('urpmi.update', if_($root, '--urpmi-root', $root), '-a', '--nocheck');
- return;
+ ugtk2::ask_warn(N("Error"),
+ N("Installation failed"),
+ N("Failure when adding medium"),
+ );
+ exit(2);
};
log::explanations("upgrading urpmi and rpmdrake");