summaryrefslogtreecommitdiffstats
path: root/mgaapplet-update-checker
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-12-21 03:27:51 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-21 03:30:35 +0100
commitf8264080cac4351e87d8e0a1549e94812c3f6c0c (patch)
treee757f0f8a59b1045403f39e87d2e2c227b7cd0a6 /mgaapplet-update-checker
parent858573ca6bf57cae345d2047c7a79e2da6a7d345 (diff)
downloadmgaonline-f8264080cac4351e87d8e0a1549e94812c3f6c0c.tar
mgaonline-f8264080cac4351e87d8e0a1549e94812c3f6c0c.tar.gz
mgaonline-f8264080cac4351e87d8e0a1549e94812c3f6c0c.tar.bz2
mgaonline-f8264080cac4351e87d8e0a1549e94812c3f6c0c.tar.xz
mgaonline-f8264080cac4351e87d8e0a1549e94812c3f6c0c.zip
we can now convert the lazy loading into regular "use"s
Diffstat (limited to 'mgaapplet-update-checker')
-rwxr-xr-xmgaapplet-update-checker8
1 files changed, 4 insertions, 4 deletions
diff --git a/mgaapplet-update-checker b/mgaapplet-update-checker
index bb852150..41ffb739 100755
--- a/mgaapplet-update-checker
+++ b/mgaapplet-update-checker
@@ -25,6 +25,10 @@ use standalone; # for explanations
use MDK::Common;
use Rpmdrake::open_db;
use mgaapplet;
+use urpm;
+use urpm::lock;
+use urpm::select;
+use urpm::media;
# be nice with other processes:
setpriority(0, $$, 7); # 0 is PRIO_PROCESS
@@ -32,8 +36,6 @@ setpriority(0, $$, 7); # 0 is PRIO_PROCESS
my $root = $ARGV[0];
my $will_not_update_media;
-require urpm;
-require urpm::lock;
# so that get_inactive_backport_media() doesn't vivify $urpm->{media}:
my $urpm = Rpmdrake::open_db::fast_open_urpmi_db();
{
@@ -56,8 +58,6 @@ if (!run_program::run('urpmi.update', $media, if_($root, "--urpmi-root=$root")))
update_backport_media($urpm);
-require urpm::select;
-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));