summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:34 +0000
committerThierry Vignaud <tv@mandriva.org>2010-01-26 16:48:34 +0000
commitc28301f371dd05a377cd2dfc7b1f6a82fd26f3bf (patch)
treef4056537fce68c1521058ddd99067bce1ad721ef
parent8b33a7f92e1925573a0e42d1d520b9220161b1f8 (diff)
downloadmgaonline-c28301f371dd05a377cd2dfc7b1f6a82fd26f3bf.tar
mgaonline-c28301f371dd05a377cd2dfc7b1f6a82fd26f3bf.tar.gz
mgaonline-c28301f371dd05a377cd2dfc7b1f6a82fd26f3bf.tar.bz2
mgaonline-c28301f371dd05a377cd2dfc7b1f6a82fd26f3bf.tar.xz
mgaonline-c28301f371dd05a377cd2dfc7b1f6a82fd26f3bf.zip
(update_backport_media) extract it out of silentCheck()
-rwxr-xr-xmdkapplet13
1 files changed, 9 insertions, 4 deletions
diff --git a/mdkapplet b/mdkapplet
index a691be6f..09177895 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -589,6 +589,14 @@ sub checker_exit {
POSIX::_exit($comm_codes{$state}{code});
}
+sub update_backport_media {
+ my ($urpm) = @_;
+ # update inactive backport media:
+ my @inactive_backport_media = Rpmdrake::open_db::get_inactive_backport_media($urpm);
+ log::explanations("updating inactive backport media " . join(', ', @inactive_backport_media)) if @inactive_backport_media;
+ run_program::run('urpmi.update', if_($root, "--urpmi-root=$root"), $_) foreach @inactive_backport_media;
+}
+
sub silentCheck() {
my $check_time if 0;
my $new_time = time();
@@ -644,10 +652,7 @@ sub silentCheck() {
checker_exit('error_updating') if $will_not_update_media;
}
- # update inactive backport media:
- my @inactive_backport_media = Rpmdrake::open_db::get_inactive_backport_media($urpm);
- log::explanations("updating inactive backport media " . join(', ', @inactive_backport_media)) if @inactive_backport_media;
- run_program::run('urpmi.update', if_($root, "--urpmi-root=$root"), $_) foreach @inactive_backport_media;
+ update_backport_media($urpm);
require urpm::select;
require urpm::media;