Page MenuHomeFreeBSD

release: Use PKG_CMD when installing pkgbase packages
ClosedPublic

Authored by markj on Oct 23 2025, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 15, 5:00 AM
Unknown Object (File)
Wed, Nov 12, 7:04 PM
Unknown Object (File)
Tue, Nov 11, 5:19 PM
Unknown Object (File)
Wed, Nov 5, 2:27 PM
Unknown Object (File)
Oct 30 2025, 2:23 PM
Unknown Object (File)
Oct 25 2025, 5:56 PM
Unknown Object (File)
Oct 25 2025, 5:52 PM
Unknown Object (File)
Oct 25 2025, 4:47 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks to me like PKG_CMD isn't guaranteed to be defined here. We're already using it in two other places, but only for no-root builds; someone running src/release/scripts/mk-vmimage.sh without NO_ROOT=1 would see this break.

Can you make it ${PKG_CMD:-pkg} here, and also in the other two places where PKG_CMD is used?

Looks to me like PKG_CMD isn't guaranteed to be defined here. We're already using it in two other places, but only for no-root builds; someone running src/release/scripts/mk-vmimage.sh without NO_ROOT=1 would see this break.

Can you make it ${PKG_CMD:-pkg} here, and also in the other two places where PKG_CMD is used?

Well, the same is true of, say, PKG_ABI. Are there users of mk-vmimage.sh outside of release/? Maybe we should instead make it an error to invoke this script without setting PKG_CMD?

Good point, it's already broken for anyone trying to run it "by hand". Let's just commit this and we can tidy things up if and when someone wants to use that script without going through the logic which initializes variables.

This revision is now accepted and ready to land.Oct 23 2025, 10:36 PM