[81829] contrib/mpab/gather_archives.sh
jmr at macports.org
jmr at macports.org
Fri Aug 5 10:15:13 PDT 2011
Revision: 81829
http://trac.macports.org/changeset/81829
Author: jmr at macports.org
Date: 2011-08-05 10:15:13 -0700 (Fri, 05 Aug 2011)
Log Message:
-----------
mpab: have gather_archives.sh look for logs in their tmp location as well, in case mpab didn't finish cleanly
Modified Paths:
--------------
contrib/mpab/gather_archives.sh
Modified: contrib/mpab/gather_archives.sh
===================================================================
--- contrib/mpab/gather_archives.sh 2011-08-05 16:08:14 UTC (rev 81828)
+++ contrib/mpab/gather_archives.sh 2011-08-05 17:15:13 UTC (rev 81829)
@@ -1,5 +1,20 @@
#!/bin/sh
+CHROOTSUBDIR=mpchroot
+dataDir=$(pwd)
+if [[ -n "$MPAB_DATA" ]]; then
+ dataDir=$MPAB_DATA
+fi
+chrootPath="${dataDir}/${CHROOTSUBDIR}"
+OSMajor=`uname -r | sed 's/\..*//'`
+# xcodebuild breaks in chroots on 10.6
+if [[ $1 = "-n" || $OSMajor -ge 10 ]]; then
+ chrootPath=""
+ if [[ $1 = "-n" ]]; then
+ shift
+ fi
+fi
+
if [[ -z "$PORTLISTFILE" ]]; then
PORTLISTFILE=portlist
fi
@@ -20,6 +35,16 @@
ports=`cat $PORTLISTFILE`
fi
+# if mpab was killed due to a timeout, logs will still be in the tmp dir
+if ! ls logs-* > /dev/null 2>&1 ; then
+ now=`date '+%Y%m%d-%H%M%S'`
+ baseDir=$(dirname $0)
+ mkdir ${baseDir}/logs-${now}
+ mv ${chrootPath}/var/tmp/portresults/fail ${baseDir}/logs-${now}
+ mv ${chrootPath}/var/tmp/portresults/success ${baseDir}/logs-${now}
+ chmod -R a+rX ${baseDir}/logs-${now}
+fi
+
for portname in $ports; do
if ls logs-*/success/${portname}.log > /dev/null 2>&1 ; then
if ./mpexport/base/portmgr/jobs/port_binary_distributable.tcl ${portname}; then
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110805/3cbb6f7e/attachment.html>
More information about the macports-changes
mailing list