summaryrefslogtreecommitdiffstats
path: root/mgaapplet
diff options
context:
space:
mode:
Diffstat (limited to 'mgaapplet')
-rwxr-xr-xmgaapplet16
1 files changed, 8 insertions, 8 deletions
diff --git a/mgaapplet b/mgaapplet
index 81be6260..cecaa68b 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -53,10 +53,16 @@ if (!find { $_ eq '--auto-update' } @ARGV) {
my $online_site = "http://www.mageia.org/";
my ($menu, $timeout, $network_timeout, $state_global, $sub_state);
+my ($download_dir);
+{
+ my $temp_urpm = Rpmdrake::open_db::fast_open_urpmi_db();
+ $root = $temp_urpm->{root};
+ $download_dir = $temp_urpm->{cachedir};
+}
read_sys_config();
$config{UPDATE_FREQUENCY} ||= 3*60*60; # default to 3hours
-if ($::testing) {
+if ($::testing || -f "$root/var/lib/mageia-prepare-upgrade/state") {
$config{FIRST_CHECK_DELAY} = 1 * 1000; # 1 second
} else {
$config{FIRST_CHECK_DELAY} ||= 5 * 60 * 1000; # default to 5 minutes
@@ -226,13 +232,7 @@ foreach my $opt (@ARGV) {
}
}
-my ($download_dir, $download_all);
-{
- my $temp_urpm = Rpmdrake::open_db::fast_open_urpmi_db();
- $root = $temp_urpm->{root};
- $download_dir = $temp_urpm->{cachedir};
-}
-
+my ($download_all);
my ($new_distro, $no_more_supported);
my ($current_apimdv_distro);