Chase pkg repo rename in cloudware builds

We ship cloudware images without a downloaded copy of the pkg repo
database, since it will typically be wildly out of date by the time
cloudware releases get launched.  These paths changed due to the
"FreeBSD" -> "FreeBSD-ports" renaming in /etc/pkg/FreeBSD.conf.

While I'm here, nuke the FreeBSD-ports-kmods repo database too; I
forgot to add that when we added that to /etc/pkg/FreeBSD.conf.

Fixes:	c83705a575 ("Rename FreeBSD* pkg repos to FreeBSD-ports*")
This commit is contained in:
Colin Percival 2025-08-28 11:32:55 -07:00
parent c18e41de74
commit 778bfd4e10
3 changed files with 6 additions and 3 deletions

View file

@ -27,7 +27,8 @@ vm_extra_pre_umount() {
# them from the image allows it to boot faster.
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg delete -f -y pkg
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
chroot ${DESTDIR} ${EMULATOR} pw usermod root -h -

View file

@ -27,7 +27,8 @@ ec2_common() {
chroot ${DESTDIR} ${EMULATOR} env ASSUME_ALWAYS_YES=yes \
/usr/sbin/pkg delete -f -y pkg
umount ${DESTDIR}/dev
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
# Turn off IPv6 Duplicate Address Detection; the EC2 networking
# configuration makes it unnecessary.

View file

@ -20,7 +20,8 @@ vagrant_common () {
# them from the image allows it to boot faster.
env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a
env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
# Vagrant instances use DHCP to get their network configuration.
echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf