Prerequisites
Background
With the pkgbase method of managing the base FreeBSD system, poudriere is an attractive tool to build pkgbase packages (together with ports packages).
poudriere jail already has both -b and -B options to build the base system from sources and package pkgbase packages.
Managing both the ports and src trees outside poudriere has benefits (one can have a full git log history in the host, but copy only latest trees into the poudriere jails). Then, using -m src=/usr/src method is the way to go.
The bug (I strongly believe)
It is natural to update the host trees using git pull and then to update the jails using poudriere jail -u -j JID -K "" -b -B -JN.
However, the subroutine install_from_src() is only doing the straight copy of the src tree from the host into the jail, without cleaning the old version in the jail:
...
msg_n "Copying ${SRC_BASE} to ${JAILMNT}/usr/src..."
mkdir -p ${JAILMNT}/usr/src
...
[cpignore logic]
...
do_clone -r ${cpignore_flag} "${SRC_BASE:?}" "${JAILMNT:?}/usr/src"
...
Expected behavior
I think nuking the old src tree from the jail before the copy is the way to go here:
rm -R "${JAILMNT:?}/usr/src"
Prerequisites
poudriere-devel-3.4.99.20251213
Ports top-level git hash: 27fa8e7879a65e89aad6f3a711eac114b472973b
FreeBSD 16.0-CURRENT #0 main-n282851-2f83319214d9: Sun Jan 4 23:57:33 CET 2026
Background
With the pkgbase method of managing the base FreeBSD system,
poudriereis an attractive tool to build pkgbase packages (together with ports packages).poudriere jailalready has both-band-Boptions to build the base system from sources and package pkgbase packages.Managing both the
portsandsrctrees outsidepoudrierehas benefits (one can have a fullgitlog history in the host, but copy only latest trees into thepoudriere jails). Then, using-m src=/usr/srcmethod is the way to go.The bug (I strongly believe)
It is natural to update the host trees using
git pulland then to update the jails usingpoudriere jail -u -j JID -K "" -b -B -JN.However, the subroutine
install_from_src()is only doing the straight copy of the src tree from the host into the jail, without cleaning the old version in the jail:Expected behavior
I think nuking the old src tree from the jail before the copy is the way to go here: