1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

* Switch back to using pkg_delete -f; we are not yet ready to deal

with all the errors from broken pkg_delete scripts

* As threatened in previous commit, move the pristine mtree spec
  generation to phase 1, and avoid having to delete and re-add the
  FETCH_DEPENDS.  We still have to keep them installed until after
  'make extract' though
This commit is contained in:
Kris Kennaway 2006-02-13 20:47:04 +00:00
parent 53563bc198
commit 17394c78b7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155961

View File

@ -111,7 +111,7 @@ del_pkg() {
else
for j in ${delpkg}; do
echo "Deleting ${j}"
if ! (pkg_delete $j); then
if ! (pkg_delete -f $j); then
echo "--> error in pkg_delete, exiting"
cleanup 0
fi
@ -156,24 +156,6 @@ if [ $phase = 1 ]; then
#Allow ports to notice they're being run on bento
export PACKAGE_BUILDING=1
add_pkg $FD
cd $dir || exit 1
pkgname=$(make package-name)
echo "================================================================"
echo "====================<phase 1: make checksum>===================="
if /pnohang $TIMEOUT /tmp/make.log1 ${pkgname} make checksum; then
cat /tmp/make.log1
echo "0" > /tmp/status
else
cleanup 1
fi
del_pkg $FD
else
# Files we do not care about changing between pre-build and post-cleanup
cat > /tmp/mtree.preexclude <<EOF
./root/*
@ -190,21 +172,38 @@ EOF
# Record a "pristine" mtree.
mtree -X /tmp/mtree.preexclude -xcn -k uid,gid,mode -p / > /tmp/mtree.pristine
add_pkg $FD
cd $dir || exit 1
pkgname=$(make package-name)
echo "================================================================"
echo "====================<phase 1: make checksum>===================="
if /pnohang $TIMEOUT /tmp/make.log1 ${pkgname} make checksum; then
cat /tmp/make.log1
echo "0" > /tmp/status
else
cleanup 1
fi
else
cd $dir || exit 1
pkgname=$(make package-name)
echo "================================================================"
echo "====================<phase 2: make extract>===================="
# XXX The 'make fetch' stage is rerun by 'make extract' since there's
# no cookie for it (and nowhere to put a cookie during 'make fetch'
# anyway, since ${WRKDIR} isn't created yet)
add_pkg ${ED} ${FD}
add_pkg ${ED}
cd $dir
/pnohang $TIMEOUT /tmp/make.log2 ${pkgname} make extract || cleanup 2
cat /tmp/make.log2
del_pkg ${ED} ${FD}
del_pkg ${ED}
# Fetch depends still need to be here for 'make extract' since that target
# always reruns 'make fetch' due to the lack of fetch cookie (and no place
# to put it since WRKDIR isn't created by 'make fetch')
del_pkg $FD
echo "================================================================"
echo "====================<phase 3: make patch>===================="
@ -229,6 +228,8 @@ EOF
./var/mail/*
./var/tmp/*
./usr/share/man/cat*/*
./usr/local/etc/apache/httpd.conf
./usr/local/etc/apache2/httpd.conf
EOF
# Record a "pristine" mtree.
mtree -X /tmp/mtree.buildexclude -xcn -k uid,gid,mode -p / > /tmp/mtree.prebuild