summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-03-30 02:08:14 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-03-30 02:08:14 +0000
commit0213a8596bdcb113b5be3709b567865d740e3b51 (patch)
tree96d045ea5c659a01b619c6d334a330f2f4f95bba
parentb399642f5c7ccc14897208f99fbe0782cb007234 (diff)
downloadmgaonline-0213a8596bdcb113b5be3709b567865d740e3b51.tar
mgaonline-0213a8596bdcb113b5be3709b567865d740e3b51.tar.gz
mgaonline-0213a8596bdcb113b5be3709b567865d740e3b51.tar.bz2
mgaonline-0213a8596bdcb113b5be3709b567865d740e3b51.tar.xz
mgaonline-0213a8596bdcb113b5be3709b567865d740e3b51.zip
(install_pkgs) add a no_X option so that we can force urpmi instead of urpmi when given the --noX option
-rwxr-xr-xmdkupdate5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdkupdate b/mdkupdate
index 37fcf097..6e1c4dcb 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -231,13 +231,14 @@ sub install_pkgs {
my ($in, $choosed, $media_name, $o_options) = @_;
$o_options ||= {};
my $w = $in->wait_message(N("Please wait"), N("Installing packages ...\n"));
+ my $program = $o_options->{no_X} ? '/usr/sbin/urpmi' : '/usr/bin/gurpmi';
eval {
if (!$o_options->{is_bundle}) {
log::explanations("applying the updates");
- system "/usr/sbin/gurpmi", "--auto", "--media", $media_name, @$choosed;
+ system $program, "--auto", "--media", $media_name, @$choosed;
} else {
log::explanations("installing the bundle");
- system "/usr/bin/gurpmi", '--auto', if_($o_options->{auto_select}, "--auto-select"),
+ system $program, '--auto', if_($o_options->{auto_select}, "--auto-select"),
if_($o_options->{medias}, "--media", join(',', @{$o_options->{medias}})),
"--searchmedia", $media_name, @$choosed;
}