diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 16:49:05 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-22 16:49:05 +0000 |
commit | 7628c081a10cae1c445bb1bdc283d0ea463dbc5c (patch) | |
tree | 37f97fade09e4bc114440d71766997b65120d183 /lib/Iurt/Urpmi.pm | |
parent | 2555e822666eaa44c9e52b62c68e34512612645d (diff) | |
download | iurt-7628c081a10cae1c445bb1bdc283d0ea463dbc5c.tar iurt-7628c081a10cae1c445bb1bdc283d0ea463dbc5c.tar.gz iurt-7628c081a10cae1c445bb1bdc283d0ea463dbc5c.tar.bz2 iurt-7628c081a10cae1c445bb1bdc283d0ea463dbc5c.tar.xz iurt-7628c081a10cae1c445bb1bdc283d0ea463dbc5c.zip |
use --urpmi_root instead of --use-distrib when the repository is http|ftp
Diffstat (limited to 'lib/Iurt/Urpmi.pm')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 0162462..5a8c80a 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -41,13 +41,16 @@ sub new { plog('DEBUG', "installation media: $run->{chrooted_media}"); } + $self->{use__urpmi_root} = $config->{repository} =~ m/^(http|ftp):/; $self->{distrib_url} = "$config->{repository}/$run->{distro}/$run->{my_arch}"; $self; } -sub set_command { &set_command__use_distrib } - +sub set_command { + my ($self, $chroot_tmp) = @_; + $self->{use__urpmi_root} ? &set_command__urpmi_root : &set_command__use_distrib; +} sub set_command__urpmi_root { my ($self, $chroot_tmp) = @_; $self->{urpmi_command} = "urpmi $self->{urpmi_options} --urpmi-root $chroot_tmp"; |