summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-06 14:38:16 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-06 14:38:16 +0000
commit20587e37205a458f43605ea7adb3cf35e35a8c5e (patch)
tree86dbfd28dba9566409f3172aef55a8e64d5b2d01 /mdkapplet
parent3b594d9e54ac99d8acf3d2b5dfa8502f86d67e1b (diff)
downloadmgaonline-20587e37205a458f43605ea7adb3cf35e35a8c5e.tar
mgaonline-20587e37205a458f43605ea7adb3cf35e35a8c5e.tar.gz
mgaonline-20587e37205a458f43605ea7adb3cf35e35a8c5e.tar.bz2
mgaonline-20587e37205a458f43605ea7adb3cf35e35a8c5e.tar.xz
mgaonline-20587e37205a458f43605ea7adb3cf35e35a8c5e.zip
(harvester,upgrade) run a 2nd gurpmi pass if first failed
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet12
1 files changed, 10 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index 5f56b08e..7932df15 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -312,7 +312,7 @@ sub is_there_a_new_distributions() {
}
-my ($mdv_update_pid, $checker_pid, $media_manager_pid);
+my ($mdv_update_pid, $checker_pid, $media_manager_pid, $refork_gurpmi);
# Signal management
sub harvester {
@@ -323,7 +323,13 @@ sub harvester {
$childpid = waitpid(-1, &WNOHANG);
if ($mdv_update_pid && $mdv_update_pid == $childpid) {
undef $mdv_update_pid;
- $mdvupdate_returned = 1;
+ if ($refork_gurpmi) {
+ undef $refork_gurpmi;
+ my $status = $? >> 8;
+ fork_gurpmi() if $status;
+ } else {
+ $mdvupdate_returned = 1;
+ }
} elsif ($checker_pid && $checker_pid == $childpid) {
undef $checker_pid;
my $status = $? >> 8;
@@ -417,6 +423,8 @@ sub upgrade() {
logIt("upgrading urpmi and rpmdrake");
logIt("upgrading the whole system");
+ # rerun gurpmi in case there was an issue (with eg: big transactions:
+ $refork_gurpmi = 1;
# we cannot use installUpdates() as MandrivaUpdate needs the media
# flaged as update (or else, we need to add a new option to MandrivaUpdate):
fork_gurpmi();