summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/do_pkgs.pm18
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;
}