From 682c19cb7969dd2495b48d98e7f3995b59e2c8a3 Mon Sep 17 00:00:00 2001 From: Joshua Root Date: Mon, 1 Aug 2011 03:43:03 +0000 Subject: [PATCH] mpab: add a progress log that just shows which ports have been built and their status git-svn-id: https://svn.macports.org/repository/macports/contrib/mpab@81516 d073be05-634f-4543-b044-5fe20cf6d1d6 --- chroot-scripts/buildports | 9 +++++---- mpab-functions | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/chroot-scripts/buildports b/chroot-scripts/buildports index eff9cbc..4c52b5e 100755 --- a/chroot-scripts/buildports +++ b/chroot-scripts/buildports @@ -62,6 +62,7 @@ function cleanBuildStuff() cleanBuildStuff PORTRESULTSDIR="/var/tmp/portresults" +PROGRESSLOG="/var/tmp/progress.log" rm -rf ${PORTRESULTSDIR} /bin/mkdir -p ${PORTRESULTSDIR}/success ${PORTRESULTSDIR}/fail @@ -90,7 +91,7 @@ currentCount=1 for portName in ${portList}; do trap "echo \"Canceled, cleaning up...\"; cleanBuildStuff" EXIT - echo "Building ${portName} (${currentCount} of ${portCount})...\c" + echo "Building ${portName} (${currentCount} of ${portCount})...\c" | tee -a ${PROGRESSLOG} # If there's a package, don't build again portVersion=`${PREFIX}/bin/port info --version --line ${portName}` portRevision=`${PREFIX}/bin/port info --revision --line ${portName}` @@ -111,10 +112,10 @@ for portName in ${portList}; do ${PREFIX}/bin/port -dv install $portName | tee ${PORTRESULTSDIR}/${portName}.log 2>&1 if [[ ${PIPESTATUS[0]} == 0 ]]; then /bin/mv ${PORTRESULTSDIR}/${portName}.log ${PORTRESULTSDIR}/success - echo "success" + echo "success" | tee -a ${PROGRESSLOG} else /bin/mv ${PORTRESULTSDIR}/${portName}.log ${PORTRESULTSDIR}/fail - echo "failure" + echo "failure" | tee -a ${PROGRESSLOG} ${PREFIX}/bin/port clean --work $portName fi uninstallPorts @@ -123,7 +124,7 @@ for portName in ${portList}; do exit 2 fi else - echo "skipping, ${skipPort} previously failed and is needed" + echo "skipping, ${skipPort} previously failed and is needed" | tee -a ${PROGRESSLOG} echo "${portName} not built due to failed dependency ${skipPort}" > ${PORTRESULTSDIR}/fail/${portName}.log fi #fi diff --git a/mpab-functions b/mpab-functions index 7820439..51800b3 100644 --- a/mpab-functions +++ b/mpab-functions @@ -266,6 +266,10 @@ function buildPorts() cp -p ${baseDir}/chroot-scripts/genportlist.tcl ${chrootPath}/var/tmp/ + rm -f ${chrootPath}/var/tmp/progress.log ${baseDir}/progress.log + touch ${baseDir}/progress.log + ln ${baseDir}/progress.log ${chrootPath}/var/tmp/progress.log + chrootExec buildports return 0