diff options
author | Arnaud Patard <rtp@mageia.org> | 2012-09-05 15:11:26 +0000 |
---|---|---|
committer | Arnaud Patard <rtp@mageia.org> | 2012-09-05 15:11:26 +0000 |
commit | 04f7d554439b6add8e010a380da05cc592012086 (patch) | |
tree | ec937855277911444cf46f45de0fa356dbebd123 | |
parent | ccdf07d10e889456203cf4071f182f071d7f1ea9 (diff) | |
download | iurt-04f7d554439b6add8e010a380da05cc592012086.tar iurt-04f7d554439b6add8e010a380da05cc592012086.tar.gz iurt-04f7d554439b6add8e010a380da05cc592012086.tar.bz2 iurt-04f7d554439b6add8e010a380da05cc592012086.tar.xz iurt-04f7d554439b6add8e010a380da05cc592012086.zip |
For non-local media, iurt is suppressing the urpmi.cfg file while creating
the chroot. This has the side effect of forcing people to use things like
--chrooted-urpmi even if the iurt configuration is fine (since it managed
to create the chroot). So, add media while creating the build chroot for
non-local media, as long as --chrooted-urpmi has not been used.
-rw-r--r-- | lib/Iurt/Chroot.pm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 67f93ff..ba87464 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -300,11 +300,23 @@ sub check_chroot_need_update { sub create_build_chroot { my ($chroot, $chroot_ref, $run, $config) = @_; + my $ret = 0; if ($run->{storage} eq 'btrfs') { - return create_build_chroot_btrfs($chroot, $chroot_ref, $run, $config); + $ret = create_build_chroot_btrfs($chroot, $chroot_ref, $run, $config); } else { - return create_build_chroot_tar($chroot, $chroot_ref, $run, $config); + $ret = create_build_chroot_tar($chroot, $chroot_ref, $run, $config); } + + if ($ret) { + my $urpmi = $run->{urpmi}; + if ($urpmi->{use__urpmi_root} && !$run->{chrooted_urpmi}) { + if (!$urpmi->add_media__urpmi_root($chroot, $config->{base_media})) { + plog('ERROR', "urpmi.addmedia --urpmi-root failed"); + return; + } + } + } + return $ret; } sub create_build_chroot_tar { |