aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2006-04-13 08:21:35 +0000
committerFlorent Villard <warly@mandriva.com>2006-04-13 08:21:35 +0000
commit4619e85ad896c287e12c3873d355ab28169977c8 (patch)
treef2bae9700b6cb03a572948fd9149e6a3c0e4aae3 /iurt2
parentbefe8d625f6900d3c992faeb7cd16c4152eb2629 (diff)
downloadiurt-4619e85ad896c287e12c3873d355ab28169977c8.tar
iurt-4619e85ad896c287e12c3873d355ab28169977c8.tar.gz
iurt-4619e85ad896c287e12c3873d355ab28169977c8.tar.bz2
iurt-4619e85ad896c287e12c3873d355ab28169977c8.tar.xz
iurt-4619e85ad896c287e12c3873d355ab28169977c8.zip
try to rebuild the chroot if the macro dump failed
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt26
1 files changed, 5 insertions, 1 deletions
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