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 | |
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')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/do_pkgs.pm | 18 |
2 files changed, 13 insertions, 6 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index e489edb43..3c9b37ff6 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,4 @@ +- use gurpmi when installing packages if possible - drakbug: o do not catch exception if $^S is undef (occurs when "eval { require foo }" and foo.pm do "use not_available") 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; } |