I used release/release.sh in a chroot more than once, and unfortunately it failed when installing packages in the chroot, until I replaced the following `install` lines with `reinstall` (which effectively does -DFORCE_PKG_REGISTER). It might be a good idea to use similar logic with chroots that are used more than once.. $ svn diff release/ Index: release/release.sh =================================================================== --- release/release.sh (revision 293115) +++ release/release.sh (working copy) @@ -275,7 +275,7 @@ PBUILD_FLAGS="${PBUILD_FLAGS} OSREL=${REVISION}" chroot ${CHROOTDIR} make -C /usr/ports/textproc/docproj \ ${PBUILD_FLAGS} OPTIONS_UNSET="FOP IGOR" \ - install clean distclean + reinstall clean distclean fi fi @@ -282,7 +282,7 @@ if [ ! -z "${EMBEDDEDPORTS}" ]; then for _PORT in ${EMBEDDEDPORTS}; do eval chroot ${CHROOTDIR} make -C /usr/ports/${_PORT} \ - BATCH=1 FORCE_PKG_REGISTER=1 install clean distclean + BATCH=1 FORCE_PKG_REGISTER=1 reinstall clean distclean done fi
A commit references this bug: Author: gjb Date: Sat Jan 9 00:45:38 UTC 2016 New revision: 293452 URL: https://svnweb.freebsd.org/changeset/base/293452 Log: Set FORCE_PKG_REGISTER=1 when installing packages to avoid failures when re-using build chroot(8) environments. This is based on the patch in the PR referenced below, but instead of using 'reinstall' in two locations (one of which already uses FORCE_PKG_REGISTER=1), changes the non-embedded behavior. PR: 205998 Submitted by: ngie MFC after: 5 days Sponsored by: The FreeBSD Foundation Changes: head/release/release.sh
A simpler change was committed, since FORCE_PKG_REGISTER=1 was already used in the embedded build path. I will MFC after 5 days, when this is tested with the next set of snapshot builds. Thank you for the report and patch.
On a side note, regarding a comment in the original PR text, the intent of this script is to build releases in a pristine environment. Re-using chroot(8) environments is not something this script is intended (nor planned to intend) to support.
A commit references this bug: Author: gjb Date: Thu Jan 14 00:26:32 UTC 2016 New revision: 293859 URL: https://svnweb.freebsd.org/changeset/base/293859 Log: MFC 293452: Set FORCE_PKG_REGISTER=1 when installing packages to avoid failures when re-using build chroot(8) environments. PR: 205998 Sponsored by: The FreeBSD Foundation Changes: _U stable/10/ stable/10/release/release.sh
Thanks gjb :)!