From a17437a8718ffe4d714516d48b137de0b0ece970 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Wed, 27 Sep 2000 01:03:17 +0000 Subject: Don't whack old packages, we have enough disk space to keep a few sets around now. Make a symlink "Makefile" so I don't have to "make -f ../../Makefile" when I'm restarting an aborted build. Print out pnohang messages along with ptimeout messages. Count the number of jobs at the beginning of the second phase too. Check integrity of packages at end with gzip -t. Remove the ones that don't pass the test. Don't try to compare list of packages if there is no prior list to compare with. If the -norestr flag is given, copy the packages to the ftp site. --- Tools/portbuild/scripts/dopackages | 89 +++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 31 deletions(-) (limited to 'Tools') diff --git a/Tools/portbuild/scripts/dopackages b/Tools/portbuild/scripts/dopackages index bcc4a5f4d7b2..720b7b07f7be 100755 --- a/Tools/portbuild/scripts/dopackages +++ b/Tools/portbuild/scripts/dopackages @@ -307,16 +307,18 @@ cd ${pb} if [ "$nobuild" = 0 ]; then ### rm -rf bak/distfiles ### mv -f distfiles bak - mkdir distfiles + mkdir -p distfiles chown -R ${user} distfiles cd ${pb}/${branch}/bak rm -rf errors logs packages old-errors cd ${pb}/${branch} mv -f errors logs packages old-errors make.* bak - cd bak/packages/All - for i in *.tgz; do - cp /dev/null $i - done +###delete old packages -- use when diskspace is scarce +# if cd bak/packages/All; then +# for i in *.tgz; do +# cp /dev/null $i +# done +# fi cd ${pb}/${branch} mkdir -p packages/All mkdir -p ${pb}/archive/errorlogs @@ -337,21 +339,23 @@ if [ "$nobuild" = 0 ]; then cp -p tarballs/$(cd ${pb}/usr/ports/$dir; make package-name).tgz packages/All done fi + count=$(awk '{sum+=$2}END{print sum+NR/2}' ${pb}/mlist | sed -e 's/\..*$//') cd ${pb}/${branch}/packages/All + ln -sf ../../Makefile . echo "================================================" echo "building packages (phase 1)" echo "================================================" echo "started at $(date)" - make -k -j$count -f ../../Makefile ${quickpkgs} all > ../../make.0 2>&1 ../../make.0 2>&1 ../../make.1 2>&1 ../../make.1 2>&1 CHECKSUM.MD5 cd ${pb}/${branch} - if grep -q 'ptimeout: killing' make.1; then + if grep -qE '(ptimeout|pnohang): killing' make.1; then echo "The following port(s) timed out:" - grep 'ptimeout: killing' make.1 | sed -e 's/^.*ptimeout:/ptimeout:/' + grep -E '(ptimeout|pnohang): killing' make.1 | sed -e 's/^.*ptimeout:/ptimeout:/' -e 's/^.*pnohang:/pnohang:/' fi cd ${pb}/${branch}/old-errors new="" @@ -422,26 +439,28 @@ if [ "$nobuild" = 0 ]; then echo -n " $(basename $i .log)" fi done - echo - echo "================================================" - echo "old packages" - echo "================================================" - cd ${pb}/${branch}/bak/packages/All - for i in *.tgz; do - if [ ! -f ${pb}/${branch}/packages/All/$i ]; then - echo -n " $(basename $i .tgz)" - fi - done - echo - echo "================================================" - echo "old failures" - echo "================================================" - cd ${pb}/${branch}/bak/errors - for i in *.log; do - if [ ! -f ${pb}/${branch}/errors/$i ]; then - echo -n " $(basename $i .log)" - fi - done + if cd ${pb}/${branch}/bak/packages/All; then + echo + echo "================================================" + echo "old packages" + echo "================================================" + for i in *.tgz; do + if [ ! -f ${pb}/${branch}/packages/All/$i ]; then + echo -n " $(basename $i .tgz)" + fi + done + fi + if cd ${pb}/${branch}/bak/errors; then + echo + echo "================================================" + echo "old failures" + echo "================================================" + for i in *.log; do + if [ ! -f ${pb}/${branch}/errors/$i ]; then + echo -n " $(basename $i .log)" + fi + done + fi echo echo "================================================" echo "new packages" @@ -468,6 +487,14 @@ if [ "$nobuild" = 0 ]; then rm -rf bak/distfiles mv -f distfiles bak su ${user} -c ${scripts}/cpdistfiles > ${pb}/cpdistfiles.log 2>&1