aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-10-03 23:45:10 +0100
committerPascal Terjan <pterjan@mageia.org>2017-10-03 23:45:18 +0100
commiteaa10d73da3e73091949f9a4d6df66a19b03a8e8 (patch)
treeea7b6e3165667de2271ebb78f0df8ec8d3eda480
parentcfe971a6e3f3260dc64c36db2eae0b3330bfdbde (diff)
downloadiurt-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.
-rw-r--r--NEWS1
-rw-r--r--lib/Iurt/Urpmi.pm12
2 files changed, 7 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 21978ed..376caa4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- iurt: also use --urpmi-root for urpmi.addmedia
+- iurt: always use --root or --urpmi-root, not plain chroot to call urpmi
0.7.0
- iurt: support resuming a full rebuild
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);