summaryrefslogtreecommitdiffstats
path: root/mdkapplet-upgrade-helper
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-13 23:26:31 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-13 23:26:31 +0000
commit488775499aa8603c9b2c8a444d22072b293ce16f (patch)
tree44dd3bb5d6fe5e56ee4d62152b0a9bd3ab5bbaaa /mdkapplet-upgrade-helper
parent7e814fc2d6c8af73ce8c53b78d8784f83deda5a9 (diff)
downloadmgaonline-488775499aa8603c9b2c8a444d22072b293ce16f.tar
mgaonline-488775499aa8603c9b2c8a444d22072b293ce16f.tar.gz
mgaonline-488775499aa8603c9b2c8a444d22072b293ce16f.tar.bz2
mgaonline-488775499aa8603c9b2c8a444d22072b293ce16f.tar.xz
mgaonline-488775499aa8603c9b2c8a444d22072b293ce16f.zip
(run_gurpmi,upgrade) run up to 4 gurpmi passes if needed
Diffstat (limited to 'mdkapplet-upgrade-helper')
-rwxr-xr-xmdkapplet-upgrade-helper12
1 files changed, 8 insertions, 4 deletions
diff --git a/mdkapplet-upgrade-helper b/mdkapplet-upgrade-helper
index d0f91f73..6a7d57f7 100755
--- a/mdkapplet-upgrade-helper
+++ b/mdkapplet-upgrade-helper
@@ -62,12 +62,16 @@ my ($refork_gurpmi);
sub run_gurpmi() {
+ my @initial_args = '--replacefiles';
while ($refork_gurpmi) {
+ fork_gurpmi(@initial_args);
+ undef @initial_args;
my $status = $? >> 8;
if ($refork_gurpmi && $status) {
- fork_gurpmi();
+ $refork_gurpmi--;
+ } else {
+ undef $refork_gurpmi;
}
- undef $refork_gurpmi;
if ($status) {
ugtk2::ask_warn(N("Error"),
N("Installation failed"),
@@ -133,7 +137,7 @@ sub upgrade() {
log::explanations("upgrading urpmi and rpmdrake");
log::explanations("upgrading the whole system");
# rerun gurpmi in case there was an issue (with eg: big transactions:
- $refork_gurpmi = 1;
+ $refork_gurpmi = 4;
{
# force PATH:
local $ENV{TMPDIR} = undef;
@@ -141,7 +145,7 @@ sub upgrade() {
}
# 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('--replacefiles');
+ run_gurpmi();
}
sub fork_gurpmi {