summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-11-19 16:57:20 +0000
committerThierry Vignaud <tv@mandriva.org>2009-11-19 16:57:20 +0000
commit5b22496d75ea1d65a97d65bac2a416473b665684 (patch)
tree5919479f2efb0a681f65e0c20fb51690d7118ee0 /mdkapplet
parenteb0ed1e02f74c1d8de638605575b3655c27871f6 (diff)
downloadmgaonline-5b22496d75ea1d65a97d65bac2a416473b665684.tar
mgaonline-5b22496d75ea1d65a97d65bac2a416473b665684.tar.gz
mgaonline-5b22496d75ea1d65a97d65bac2a416473b665684.tar.bz2
mgaonline-5b22496d75ea1d65a97d65bac2a416473b665684.tar.xz
mgaonline-5b22496d75ea1d65a97d65bac2a416473b665684.zip
(silentCheck) cache return value of is_it_a_devel_distro()
(needed for next commit)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index c4751584..ca6fa703 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -578,7 +578,9 @@ sub silentCheck() {
}
checker_exit('locked') if $will_not_update_media;
- if (!run_program::run('urpmi.update', (is_it_a_devel_distro2() ? '-a' : '--update'), if_($root, "--urpmi-root=$root"))) {
+ my $is_it_a_devel_distro = is_it_a_devel_distro();
+ my $media = $is_it_a_devel_distro ? '-a' : '--update';
+ if (!run_program::run('urpmi.update', $media, if_($root, "--urpmi-root=$root"))) {
checker_exit('error_updating') if $will_not_update_media;
}
@@ -591,7 +593,7 @@ sub silentCheck() {
require urpm::media;
# this eats 52Mb of RAM on 64bit:
# (hence we do it in the forked helper so that the applet doesn't eat too much RAM)
- urpm::media::configure($urpm, if_(!is_it_a_devel_distro(), update => 1));
+ urpm::media::configure($urpm, if_(!$is_it_a_devel_distro, update => 1));
my @update_medias = get_update_medias($urpm);
if (!@update_medias) {
get_product_id();