From c4b86368de6e7221d3e4b409581af235532fc9e4 Mon Sep 17 00:00:00 2001 From: Satoshi Asami Date: Wed, 27 Sep 2000 00:09:10 +0000 Subject: Don't add packages that are already installed. Use pnohang to catch make checksum (fetch) or make package (usually an xemacs running away) that aren't making any progress. --- Tools/portbuild/scripts/buildscript | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'Tools') diff --git a/Tools/portbuild/scripts/buildscript b/Tools/portbuild/scripts/buildscript index a38f59871d46..a7bf4b7a4ef7 100755 --- a/Tools/portbuild/scripts/buildscript +++ b/Tools/portbuild/scripts/buildscript @@ -17,21 +17,29 @@ if [ $phase = 1 ]; then echo "adding dependencies" for i in *.tgz; do echo "pkg_add -f $i" - if ! pkg_add -f $i; then - echo "error in dependency $i, exiting" - echo "1" > /tmp/status - exit 1 + base=$(basename $i .tgz) + if pkg_info -q -e $base; then + echo "skipping $base, already added" + else + if ! pkg_add -f $i; then + echo "error in dependency $i, exiting" + echo "1" > /tmp/status + exit 1 + fi fi done fi cd $dir || exit 1 + pkgname=$(make package-name) echo "================================================================" echo "========================================" - if make checksum; then + if /pnohang $TIMEOUT /tmp/make.log1 ${pkgname} make checksum; then + cat /tmp/make.log1 echo "0" > /tmp/status else + cat /tmp/make.log1 echo "1" > /tmp/status echo "================================================================" echo -n "build ended at " @@ -52,9 +60,10 @@ else fi cd $dir || exit 1 - if make package; then + pkgname=$(make package-name) + if /pnohang $TIMEOUT /tmp/make.log2 ${pkgname} make package; then + cat /tmp/make.log2 echo "0" > /tmp/status - pkgname=$(make package-name) prefix=$(make -V PREFIX) mtreefile=$(make -V MTREE_FILE) echo "================================================================" @@ -109,6 +118,7 @@ else fi fi else + cat /tmp/make.log2 echo "1" > /tmp/status fi -- cgit v1.2.3