summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-03 14:41:40 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-03 14:41:40 +0000
commitb071640da5f36d566c5db68d93ea7906e49516bf (patch)
treeb74d501f478dd840cecc2d25b3ca35eddd4f3cc5 /mdkapplet
parent225e9db8ba3b82d761d5f49653da9e38cd7e5e33 (diff)
downloadmgaonline-b071640da5f36d566c5db68d93ea7906e49516bf.tar
mgaonline-b071640da5f36d566c5db68d93ea7906e49516bf.tar.gz
mgaonline-b071640da5f36d566c5db68d93ea7906e49516bf.tar.bz2
mgaonline-b071640da5f36d566c5db68d93ea7906e49516bf.tar.xz
mgaonline-b071640da5f36d566c5db68d93ea7906e49516bf.zip
(confirm_upgrade) split it out of upgrade()
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet11
1 files changed, 8 insertions, 3 deletions
diff --git a/mdkapplet b/mdkapplet
index a23ae92c..17d36ddd 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -351,11 +351,16 @@ sub restart_applet() {
exec($0, '--auto-update');
}
-sub upgrade() {
- return if !(ugtk2::ask_yesorno(N("A new stable distribution has been released"),
+sub confirm_upgrade() {
+ my $bool = ugtk2::ask_yesorno(N("A new stable distribution has been released"),
N("A new stable distribution has been released."),
N("Do you want to upgrade to the '\%s' distribution?", $new_distro_version),
- ));
+ );
+ $bool;
+}
+
+sub upgrade() {
+ return if !confirm_upgrade();
logIt("backuping urpmi configuration");
cp_af("$root/etc/urpmi/urpmi.cfg", "$ENV{HOME}/urpmi.cfg.backup." . int(rand 100000));