diff options
author | Pascal Terjan <pterjan@mageia.org> | 2017-10-03 23:45:10 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2017-10-03 23:45:18 +0100 |
commit | eaa10d73da3e73091949f9a4d6df66a19b03a8e8 (patch) | |
tree | ea7b6e3165667de2271ebb78f0df8ec8d3eda480 /lib/Iurt | |
parent | cfe971a6e3f3260dc64c36db2eae0b3330bfdbde (diff) | |
download | iurt-eaa10d73da3e73091949f9a4d6df66a19b03a8e8.tar iurt-eaa10d73da3e73091949f9a4d6df66a19b03a8e8.tar.gz iurt-eaa10d73da3e73091949f9a4d6df66a19b03a8e8.tar.bz2 iurt-eaa10d73da3e73091949f9a4d6df66a19b03a8e8.tar.xz iurt-eaa10d73da3e73091949f9a4d6df66a19b03a8e8.zip |
Do not use chroot urpmi
Either use urpmi --root or urpmi --urpmi-root so that packages
can be installed without networking inside the chroot.
Diffstat (limited to 'lib/Iurt')
-rw-r--r-- | lib/Iurt/Urpmi.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Iurt/Urpmi.pm b/lib/Iurt/Urpmi.pm index 401ae91..ff702bd 100644 --- a/lib/Iurt/Urpmi.pm +++ b/lib/Iurt/Urpmi.pm @@ -38,7 +38,12 @@ sub new { sub set_command { my ($self, $_chroot_tmp) = @_; - $self->{use__urpmi_root} ? &set_command__urpmi_root : &set_command__use_distrib; + if ($run->{chrooted_urpmi}) { + # FIXME chrooted_urpmi should always use urpmi_root and not support local media + $self->{use__urpmi_root} ? &set_command__urpmi_root : &set_command__use_distrib; + } else { + &set_command__use_distrib; + } } sub set_command__urpmi_root { my ($self, $chroot_tmp) = @_; @@ -50,10 +55,6 @@ sub set_command__use_distrib { $self->{use_iurt_root_command} = 1; $self->{urpmi_command} = "urpmi $self->{urpmi_options} --use-distrib $self->{distrib_url} --root $chroot_tmp"; } -sub set_command__chrooted { - my ($self, $chroot_tmp) = @_; - $self->{urpmi_command} = "chroot $chroot_tmp urpmi $self->{urpmi_options} "; -} sub set_local_media { my ($self, $local_media) = @_; @@ -164,7 +165,6 @@ sub urpmi_command { add_media($self, $chroot_tmp, 'iurt_group', "iurt_group file:///iurt_media") or next; } - $self->set_command__chrooted($chroot_tmp); return 1; } else { $self->set_command($chroot_tmp); |