diff options
author | Olivier Blin <blino@mageia.org> | 2011-01-13 12:40:21 +0000 |
---|---|---|
committer | Olivier Blin <blino@mageia.org> | 2011-01-13 12:40:21 +0000 |
commit | 52c6bf712bc25b1dd318d3c485f847133f26243d (patch) | |
tree | 6b214f2fccd28bbb172be6b6af176d609547f323 /lib | |
parent | ca2753b077f6c64206c7b50ce2b61068abe04692 (diff) | |
download | iurt-52c6bf712bc25b1dd318d3c485f847133f26243d.tar iurt-52c6bf712bc25b1dd318d3c485f847133f26243d.tar.gz iurt-52c6bf712bc25b1dd318d3c485f847133f26243d.tar.bz2 iurt-52c6bf712bc25b1dd318d3c485f847133f26243d.tar.xz iurt-52c6bf712bc25b1dd318d3c485f847133f26243d.zip |
fail early if chroot creation fails (if some suggests have unsatisfied
deps, chroot creation will appear as failed in status log and make
ulri fail, but the chroot was still usable to build package, and the
whole build was marked as failed only after finishing the package rebuild)
this also removes duplicate check for /bin/rpm
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Chroot.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index c331b53..6464f49 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -511,7 +511,7 @@ sub build_chroot { $urpmi->set_command($tmp_chroot); # 20060826 warly urpmi --root does not work properly - $urpmi->install_packages( + if (!$urpmi->install_packages( "chroot", $tmp_chroot, $run->{local_spool}, @@ -520,11 +520,8 @@ sub build_chroot { "[ADMIN] creation of initial chroot failed on $run->{my_arch}", { maintainer => $config->{admin} }, @{$opt->{packages}} - ); - - # Yes, /usr/lib/rpm/rpmb even for x86_64 - if (! -f "$tmp_chroot/bin/rpm") { - plog('ERROR', "Base packages missing in generated chroot."); + )) { + plog('ERROR', "Failed to install initial packages during chroot creation."); return 0; } |