HomeFreeBSD

pkgbase-stage: Use unique PKG_DBDIR

Description

pkgbase-stage: Use unique PKG_DBDIR

Prior to this commit, pkgbase-stage.lua used a hard-coded PKG_DBDIR
"./pkgdb"; unfortunately this creates a race condition if we start
building disc1.iso and dvd1.iso at the same time

pkg: sqlite error while executing CREATE TABLE licenses [...]
in file pkgdb.c:2330: table licenses already exists

since pkg checks to see if the pkgdb is initialized and initializes
it if not.

Use separate pkgdb-disc1 and pkgdb-dvd directories.

MFC after: 1 minute
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D52755

Details

Provenance
cpercivaAuthored on Sep 27 2025, 1:23 AM
Differential Revision
D52755: pkgbase-stage: Use unique PKG_DBDIR
Parents
rG5e395c34402d: vfs: stop using SDT_PROBES_ENABLED in inlined ops
Branches
Unknown
Tags
Unknown