diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-15 14:28:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-15 14:28:36 +0000 |
commit | b07d044f1a66a271a919be82c36d0fd20ccb7002 (patch) | |
tree | ec190de2f1640aa2c2f6f788545ed6f46faab6c8 | |
parent | 6602856ed202e69d34c8f458866a759a496923dd (diff) | |
download | mgaonline-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-- | NEWS | 4 | ||||
-rwxr-xr-x | mdkapplet-upgrade-helper | 16 |
2 files changed, 18 insertions, 2 deletions
@@ -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"); |