diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-03-03 15:07:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-03-03 15:07:02 +0000 |
commit | 0e365fee1d1668a17a08c9143e9df14ef0148927 (patch) | |
tree | 09b8b83d8e4a57b3630838e546295b2a4316e7ec /perl-install/do_pkgs.pm | |
parent | a0c99bbcd7be82b0733f314e404147cbd5cc69e1 (diff) | |
download | drakx-0e365fee1d1668a17a08c9143e9df14ef0148927.tar drakx-0e365fee1d1668a17a08c9143e9df14ef0148927.tar.gz drakx-0e365fee1d1668a17a08c9143e9df14ef0148927.tar.bz2 drakx-0e365fee1d1668a17a08c9143e9df14ef0148927.tar.xz drakx-0e365fee1d1668a17a08c9143e9df14ef0148927.zip |
(do_pkgs_standalone::install) run gurpmi instead of urpmi in GUI mode (#24044)
(needs urpmi > 5.6)
Diffstat (limited to 'perl-install/do_pkgs.pm')
-rw-r--r-- | perl-install/do_pkgs.pm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/perl-install/do_pkgs.pm b/perl-install/do_pkgs.pm index a660954c7..3fbeca631 100644 --- a/perl-install/do_pkgs.pm +++ b/perl-install/do_pkgs.pm @@ -208,12 +208,18 @@ sub install { return 1; } - my $_wait = $do->in && $do->in->wait_message(N("Please wait"), N("Installing packages...")); - $do->in->suspend if $do->in; - log::explanations("installing packages @l"); - #- --expect-install added in urpmi 4.6.11 - my $ret = system('urpmi', '--allow-medium-change', '--auto', '--no-verify-rpm', '--gui', '--expect-install', @l) == 0; - $do->in->resume if $do->in; + my @options = ('--allow-medium-change', '--auto', '--no-verify-rpm', '--expect-install', @l); + my $ret; + if (check_for_xserver() && -x '/usr/sbin/gurpmi') { + $ret = system('gurpmi', @options) == 0; + } else { + my $_wait = $do->in && $do->in->wait_message(N("Please wait"), N("Installing packages...")); + $do->in->suspend if $do->in; + log::explanations("installing packages @l"); + #- --expect-install added in urpmi 4.6.11 + $ret = system('urpmi', '--gui', @options) == 0; + $do->in->resume if $do->in; + } $ret; } |