summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-18 10:08:24 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-18 10:08:24 +0000
commite84890be9c73bbd60931ee5fa5b13f83add28e19 (patch)
treec6c34e1b164ea992944a833cb7f4ed98f2498462
parent45f5e010cbdb38a6ab8836143d098fc71831e73d (diff)
downloadmgaonline-e84890be9c73bbd60931ee5fa5b13f83add28e19.tar
mgaonline-e84890be9c73bbd60931ee5fa5b13f83add28e19.tar.gz
mgaonline-e84890be9c73bbd60931ee5fa5b13f83add28e19.tar.bz2
mgaonline-e84890be9c73bbd60931ee5fa5b13f83add28e19.tar.xz
mgaonline-e84890be9c73bbd60931ee5fa5b13f83add28e19.zip
(silentCheck) update inactive backport media (#34620)
-rwxr-xr-xmdkapplet9
1 files changed, 8 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index 69fd1398..687b1892 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -39,6 +39,7 @@ use ugtk2 qw(:all);
use lib qw(/usr/lib/libDrakX/drakfirsttime);
use mdkonline;
use Gtk2::Notify '-init', 'mdkapplet';
+use Rpmdrake::open_db;
# POSIX unmasks the sigprocmask properly
my $sigset = POSIX::SigSet->new;
@@ -336,7 +337,8 @@ sub silentCheck() {
my $will_not_update_media;
require urpm;
require urpm::lock;
- my $urpm = urpm->new;
+ # so that get_inactive_backport_media() doesn't vivify $urpm->{media}:
+ my $urpm = fast_open_urpmi_db();
{
local $urpm->{fatal} = sub {
print "Fatal: @_\n";
@@ -352,6 +354,11 @@ sub silentCheck() {
$exit->('error_updating') if $will_not_update_media;
}
+ # update inactive backport media:
+ my @inactive_backport_media = Rpmdrake::open_db::get_inactive_backport_media($urpm);
+ logIt("updating inactive backport media " . join(', ', @inactive_backport_media)) if @inactive_backport_media;
+ run_program::run('urpmi.update', $_) foreach @inactive_backport_media;
+
require urpm::select;
require urpm::media;
urpm::media::configure($urpm, update => 1);