summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorJoão Victor Duarte Martins <jvictor@mandriva.com>2010-07-27 22:12:55 +0000
committerJoão Victor Duarte Martins <jvictor@mandriva.com>2010-07-27 22:12:55 +0000
commit9de16b896af952c00c12e60751f7fb602a9f5a84 (patch)
tree63dc419aff900535bf6b91dc8c950a1699d11872 /mdkapplet
parent95131d42ad6fc221a36f22d002b1b36601c0b2ec (diff)
downloadmgaonline-9de16b896af952c00c12e60751f7fb602a9f5a84.tar
mgaonline-9de16b896af952c00c12e60751f7fb602a9f5a84.tar.gz
mgaonline-9de16b896af952c00c12e60751f7fb602a9f5a84.tar.bz2
mgaonline-9de16b896af952c00c12e60751f7fb602a9f5a84.tar.xz
mgaonline-9de16b896af952c00c12e60751f7fb602a9f5a84.zip
* mdkapplet-upgrade-helper (run_gurpmi): create windows before upgrade
(fix #59025); send SIGHUP to mdkapplet so it will restarts (fix #59481). * mdkapplet (get_extended_maintenance): updated to mdkapplet-add-media-helper. (restart_applet): restart handler to SIGHUP.
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet16
1 files changed, 12 insertions, 4 deletions
diff --git a/mdkapplet b/mdkapplet
index 0d39413a..8dee807c 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -289,6 +289,7 @@ Glib::Timeout->add_seconds($config{FIRST_CHECK_DELAY}/1000, sub {
$SIG{USR1} = 'IGNORE';
$SIG{USR2} = 'IGNORE';
$SIG{CHLD} = \&harvester;
+$SIG{HUP} = \&restart_applet;
run_program::raw({ detach => 1 }, 'ionice', '-p', $$, '-n7');
@@ -433,6 +434,13 @@ sub harvester {
return @pids;
}
+sub restart_applet {
+ local $SIG{CHLD} = 'DEFAULT';
+ log::explanations(N("Received SIGHUP (probably an upgrade has finished), restarting applet."));
+ { redo if wait() > 0 }
+ exec($0, '--auto-update');
+}
+
# FIXME: we can run many drakconnect when network is down:
sub configNetwork() {
log::explanations(N_("Launching drakconnect\n"));
@@ -612,10 +620,10 @@ sub no_more_supported() {
sub get_extended_maintenance() {
- $mdv_update_pid = fork_exec('mdkapplet-extended-maintenance-helper', $product_id->{version},
- if_($::testing, '--testing'),
- if_($download_all, "--download-all=$download_dir"),
- if_($root, "--urpmi-root=$root"));
+ $mdv_update_pid = fork_exec('mdkapplet-add-media-helper',
+ if_($root, "--urpmi-root=$root"),
+ '--product=extended',
+ $product_id->{version});
}