[Mageia-sysadm] [278] fail early if chroot creation fails ( if some suggests have unsatisfied

root at mageia.org root at mageia.org
Thu Jan 13 13:40:21 CET 2011


Revision: 278
Author:   blino
Date:     2011-01-13 13:40:21 +0100 (Thu, 13 Jan 2011)
Log Message:
-----------
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

Modified Paths:
--------------
    build_system/iurt/trunk/lib/Iurt/Chroot.pm

Modified: build_system/iurt/trunk/lib/Iurt/Chroot.pm
===================================================================
--- build_system/iurt/trunk/lib/Iurt/Chroot.pm	2011-01-13 11:12:27 UTC (rev 277)
+++ build_system/iurt/trunk/lib/Iurt/Chroot.pm	2011-01-13 12:40:21 UTC (rev 278)
@@ -511,7 +511,7 @@
     $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 @@
 	"[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;
     }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110113/33d3fc58/attachment.html>


More information about the Mageia-sysadm mailing list