aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>2000-09-27 08:09:10 +0800
committerasami <asami@FreeBSD.org>2000-09-27 08:09:10 +0800
commit8306c41db92b05e0db52e979d9a8d9fd76d7ed64 (patch)
tree1f0def33f91f381988ea22c5799a6c9cac8034c6 /Tools
parent538656ee5b070dc52ef961ad0c0bc7ed72ed2f80 (diff)
downloadfreebsd-ports-gnome-8306c41db92b05e0db52e979d9a8d9fd76d7ed64.tar.gz
freebsd-ports-gnome-8306c41db92b05e0db52e979d9a8d9fd76d7ed64.tar.zst
freebsd-ports-gnome-8306c41db92b05e0db52e979d9a8d9fd76d7ed64.zip
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.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/buildscript24
1 files changed, 17 insertions, 7 deletions
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 "====================<phase 1: make checksum>===================="
- 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