diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-03-30 02:08:14 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-03-30 02:08:14 +0000 |
commit | 0213a8596bdcb113b5be3709b567865d740e3b51 (patch) | |
tree | 96d045ea5c659a01b619c6d334a330f2f4f95bba /mdkupdate | |
parent | b399642f5c7ccc14897208f99fbe0782cb007234 (diff) | |
download | mgaonline-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
Diffstat (limited to 'mdkupdate')
-rwxr-xr-x | mdkupdate | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |