Page MenuHomeFreeBSD

release: Use PKG_CMD when installing pkgbase packages
ClosedPublic

Authored by markj on Thu, Oct 23, 10:22 PM.
Tags
None
Referenced Files
F133227189: D53307.diff
Fri, Oct 24, 3:37 AM
F133225394: D53307.id164910.diff
Fri, Oct 24, 3:15 AM
F133225322: D53307.id.diff
Fri, Oct 24, 3:14 AM
F133220859: D53307.id164911.diff
Fri, Oct 24, 2:21 AM
F133220794: D53307.id.diff
Fri, Oct 24, 2:20 AM
F133218347: D53307.diff
Fri, Oct 24, 1:51 AM
Subscribers

Details

Summary

This defaults to plain "pkg", but being able to override it is useful
for testing purposes.

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.Thu, Oct 23, 10:36 PM