bsdinstall: Enable FreeBSD-base repo when pkgbase

When performing a pkgbase install, create a configuration file in
/usr/local/etc/pkg/repos/FreeBSD.conf which enables the FreeBSD-base
repository.  (This repository is defined in /etc/pkg/FreeBSD.conf as
being disabled by default.)

Reported by:	Mark Millard
Reviewed by:	markj
MFC after:	immediately (needed for 15.0-RC1)
Differential Revision:	https://reviews.freebsd.org/D53777
This commit is contained in:
Colin Percival
2025-11-15 13:56:35 -08:00
parent 10a4f2d016
commit a96230e032
+4
View File
@@ -355,6 +355,10 @@ local function pkgbase()
if not os.execute(pkg .. "install -U -y -r FreeBSD-base " .. packages) then
os.exit(1)
end
-- Enable the FreeBSD-base repository for this system.
assert(os.execute("mkdir -p " .. chroot .. "/usr/local/etc/pkg/repos"))
assert(os.execute("echo 'FreeBSD-base: { enabled: yes }' > " .. chroot .. "/usr/local/etc/pkg/repos/FreeBSD.conf"))
end
pkgbase()