diff options
author | Colin Guthrie <colin@mageia.org> | 2013-05-15 20:22:09 +0000 |
---|---|---|
committer | Colin Guthrie <colin@mageia.org> | 2013-05-15 20:22:09 +0000 |
commit | d5d73978015f032292085b783ed62a9bc10be069 (patch) | |
tree | 8d8341ef1711f4efbdfefc436a3f4692edd0e20f | |
parent | cf74235920962a7ad30eb4d213e648b2d0183bf9 (diff) | |
download | mgaonline-d5d73978015f032292085b783ed62a9bc10be069.tar mgaonline-d5d73978015f032292085b783ed62a9bc10be069.tar.gz mgaonline-d5d73978015f032292085b783ed62a9bc10be069.tar.bz2 mgaonline-d5d73978015f032292085b783ed62a9bc10be069.tar.xz mgaonline-d5d73978015f032292085b783ed62a9bc10be069.zip |
Move gurpmi arguments into the fork_gurpmi function.
The arguments are currently split up between run_gurpmi and fork_gurpmi
for no particular reason.
-rwxr-xr-x | mgaapplet-upgrade-helper | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mgaapplet-upgrade-helper b/mgaapplet-upgrade-helper index 543ee66d..30a68a2e 100755 --- a/mgaapplet-upgrade-helper +++ b/mgaapplet-upgrade-helper @@ -94,9 +94,6 @@ sub check_available_free_space { } sub run_gurpmi() { - my @initial_args = ('--replacefiles', '--clean'); - push @initial_args, "--download-all=$download_dir" if $download_dir; - # Windows are created before upgrading packages, to guarantee that # any possible related GTK upgrade won't affect us... my $succeeded_win = create_upgrade_succeeded_window(); @@ -104,7 +101,7 @@ sub run_gurpmi() { while ($refork_gurpmi) { - my $ok = fork_gurpmi(@initial_args); + my $ok = fork_gurpmi(); if ($refork_gurpmi && !$ok) { $refork_gurpmi--; } else { @@ -327,8 +324,9 @@ packages as well?).")) sub fork_gurpmi { run_program::raw({ timeout => 'never' }, - 'gurpmi', '>>', $log_file, '2>>', $log_file, '--auto', '--auto-select', - if_($root, "--urpmi-root=$root"), @_); + 'gurpmi', '>>', $log_file, '2>>', $log_file, '--auto', '--auto-select', '--replacefiles', '--clean', + if_($root, "--urpmi-root=$root"), + if_($download_dir, "--download-all=$download_dir")); } sub update_media() { |