Changeset 82197
- Timestamp:
- 08/10/11 05:12:09 (4 years ago)
- Location:
- contrib/mpab
- Files:
-
- 2 edited
-
chroot-scripts/buildports (modified) (3 diffs)
-
mpab-functions (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
contrib/mpab/chroot-scripts/buildports
r81645 r82197 64 64 PORTRESULTSDIR="/var/tmp/portresults" 65 65 PROGRESSLOG="/var/tmp/progress.log" 66 FAILCACHE="/var/tmp/failcache" 66 67 rm -rf ${PORTRESULTSDIR} 67 68 /bin/mkdir -p ${PORTRESULTSDIR}/success ${PORTRESULTSDIR}/fail … … 102 103 else 103 104 skipPort="" 104 portDeps=`${PREFIX}/bin/port info --index --depends --line ${portName} | /usr/bin/tr ',' ' '` 105 for oneDep in ${portDeps}; do 106 depType=`echo ${oneDep} | /usr/bin/awk -F : '{print $1}'` 107 if [[ $depType == "port" ]]; then 108 depName=`echo ${oneDep} | /usr/bin/awk -F : '{print $2}'` 109 if [[ -f ${PORTRESULTSDIR}/fail/${depName}.log ]]; then 110 skipPort=$depName 111 break 105 portFile=`${PREFIX}/bin/port file ${portName}` 106 if [[ ! "$portFile" -nt "${FAILCACHE}/${portName}" ]]; then 107 echo "skipping, portfile not modified since last failure" | tee -a ${PROGRESSLOG} | tee ${PORTRESULTSDIR}/fail/${portName}.log 108 skipPort=1 109 else 110 portDeps=`${PREFIX}/bin/port info --index --depends --line ${portName} | /usr/bin/tr ',' ' '` 111 nonPortDeps="" 112 for oneDep in ${portDeps}; do 113 depType=`echo ${oneDep} | /usr/bin/awk -F : '{print $1}'` 114 if [[ $depType == "port" ]]; then 115 depName=`echo ${oneDep} | /usr/bin/awk -F : '{print $2}'` 116 if [[ -f ${PORTRESULTSDIR}/fail/${depName}.log ]]; then 117 skipPort=1 118 echo "skipping, $depName previously failed and is needed" | tee -a ${PROGRESSLOG} 119 echo "${portName} not built due to failed dependency $depName" > ${PORTRESULTSDIR}/fail/${portName}.log 120 break 121 fi 122 else 123 nonPortDeps=1 112 124 fi 113 fi114 done115 if [[ -z $skipPort]]; then125 done 126 fi 127 if [[ -z "$skipPort" ]]; then 116 128 ${PREFIX}/bin/port -dv install $portName | tee ${PORTRESULTSDIR}/${portName}.log 2>&1 117 129 if [[ ${PIPESTATUS[0]} == 0 ]]; then 118 130 /bin/mv ${PORTRESULTSDIR}/${portName}.log ${PORTRESULTSDIR}/success 119 131 echo "success" | tee -a ${PROGRESSLOG} 132 rm -f ${FAILCACHE}/${portName} 120 133 else 121 134 /bin/mv ${PORTRESULTSDIR}/${portName}.log ${PORTRESULTSDIR}/fail 122 135 echo "failure" | tee -a ${PROGRESSLOG} 123 136 ${PREFIX}/bin/port clean --work $portName 137 # check that it definitely failed in its own right before caching 138 if [[ -z "$nonPortDeps" ]]; then 139 touch -r ${portFile} ${FAILCACHE}/${portName} 140 fi 124 141 fi 125 142 uninstallPorts … … 128 145 exit 2 129 146 fi 130 else131 echo "skipping, ${skipPort} previously failed and is needed" | tee -a ${PROGRESSLOG}132 echo "${portName} not built due to failed dependency ${skipPort}" > ${PORTRESULTSDIR}/fail/${portName}.log133 147 fi 134 148 fi -
contrib/mpab/mpab-functions
r81549 r82197 276 276 ln -s ${baseDir}/progress.log ${chrootPath}/var/tmp/progress.log 277 277 fi 278 mkdir -p ${baseDir}/failcache 279 rsync -a ${baseDir}/failcache ${chrootPath}/var/tmp 278 280 279 281 chrootExec buildports 282 283 rsync -a ${chrootPath}/var/tmp/failcache ${baseDir} 280 284 281 285 return 0
Note: See TracChangeset
for help on using the changeset viewer.

