From f9cd729dcc43f08544af5e6260e51aa200772390 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 3 Jun 2009 21:22:44 +0000 Subject: better logging related to chroots and attempt to separate log files svn path=/trunk/; revision=11663 --- scripts/auto-build/run-automated-builder | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/auto-build/run-automated-builder b/scripts/auto-build/run-automated-builder index e6499bf7..e53122b2 100755 --- a/scripts/auto-build/run-automated-builder +++ b/scripts/auto-build/run-automated-builder @@ -39,12 +39,18 @@ run_build_script () BUILDSCRIPT="${HOME}/auto-build/${distro}/scripts/auto-build/${distro}-auto-builder.sh" ## LATER: make the uploaded ${LOGFILE} (name) be consistent with the uploaded package-file (name) - LOGFILE="${HOME}/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}_${SCRIPT}.txt" + LOGFILE="${HOME}/logs/${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${distro}.txt" touch "${LOGFILE}" if [ -d /var/chroot/$chroot ]; then + echo "----------------------------------------" >> "$LOGFILE" 2>&1 + echo "Building in dchroot $chroot" >> "$LOGFILE" 2>&1 + echo "----------------------------------------" >> "$LOGFILE" 2>&1 dchroot -c $chroot -d "$BUILDSCRIPT" >> "$LOGFILE" 2>&1 else + echo "----------------------------------------" >> "$LOGFILE" 2>&1 + echo "Building on native system" >> "$LOGFILE" 2>&1 + echo "----------------------------------------" >> "$LOGFILE" 2>&1 sh "$BUILDSCRIPT" >> "$LOGFILE" 2>&1 fi @@ -75,7 +81,7 @@ for distrodir in ${HOME}/auto-build/*; do if [ -e /var/chroot ]; then for chrootdir in /var/chroot/*; do chroot=$(echo $chrootdir | sed 's|.*/\(.*\)|\1|') - HOSTNAME=`cat /etc/hostname` + HOSTNAME=`cat /var/chroot/$chroot/etc/hostname` run_build_script $distro $chroot done fi -- cgit v1.2.1