From 52c6bf712bc25b1dd318d3c485f847133f26243d Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 13 Jan 2011 12:40:21 +0000 Subject: 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 --- lib/Iurt/Chroot.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.1