From 4619e85ad896c287e12c3873d355ab28169977c8 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Thu, 13 Apr 2006 08:21:35 +0000 Subject: try to rebuild the chroot if the macro dump failed --- iurt2 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/iurt2 b/iurt2 index 69e9379..6be6b67 100755 --- a/iurt2 +++ b/iurt2 @@ -324,7 +324,11 @@ if (!-d "$config->{local_upload}/iurt/$run{distro_tag}/") { # perform some cleaning before running to have some more space system(qq|find $local_spool/log/ -name "*.log" \\( -size +$config->{log_size_limit} -or -mtime +$config->{log_size_date} \\) -exec rm -f {} \\;|); -dump_rpmmacros("$chroot/home/builder/.rpmmacros") or die "FATAL iurt: could not dump rpm macros to $chroot/home/builder/.rpmmacros"; +if (!dump_rpmmacros("$chroot/home/builder/.rpmmacros")) { + print "ERROR iurt: could not dump rpm macros to $chroot/home/builder/.rpmmacros, trying to rebuild the chroot"; + check_chroot($chroot, $chroot_tar, \%run); + dump_rpmmacros("$chroot/home/builder/.rpmmacros") or die "FATAL iurt: could not dump rpm macros to $chroot/home/builder/.rpmmacros" +} my $unionfs_dir; if ($run{unionfs}) { # FIXME need to grep /proc/modules not ot try to load it if already loaded -- cgit v1.2.1