summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--NEWS4
-rwxr-xr-xmdkapplet-upgrade-helper16
2 files changed, 18 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 97a8267e..245fd5a3 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+- mdkapplet-upgrade-helper
+ o display error dialog instead of success one when we cannot add the
+ media
+
Version 2.60 - 14 October 2008
- mdkapplet-upgrade-helper
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");