summaryrefslogtreecommitdiffstats
path: root/mgaapplet-update-checker
diff options
context:
space:
mode:
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));