Page MenuHomeFreeBSD

release: Improve kernel package handling
ClosedPublic

Authored by ivy on Sat, Sep 20, 2:40 AM.
Tags
None
Referenced Files
F130836432: D52638.diff
Thu, Oct 2, 5:00 PM
Unknown Object (File)
Sun, Sep 28, 10:09 PM
Unknown Object (File)
Sun, Sep 28, 12:03 PM
Unknown Object (File)
Sat, Sep 20, 2:48 PM
Unknown Object (File)
Sat, Sep 20, 9:30 AM
Unknown Object (File)
Sat, Sep 20, 8:10 AM
Unknown Object (File)
Sat, Sep 20, 7:56 AM
Unknown Object (File)
Sat, Sep 20, 6:44 AM
Subscribers

Details

Summary

Although support for PowerPC kernels (GENERIC64 and GENERIC64LE) was
added to pkgbase-stage.lua, the equivalent support was missing from
bsdinstall, so the installer would fail at runtime since it wouldn't
find a kernel package.

Improve the pkgbase-stage logic to have a specific list of kernels
we want to support (which avoids breaking if multiple kernels are
available), and use the same logic in both bsdinstall and pkgbase-stage.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67192
Build 64075: arc lint + arc unit

Event Timeline

ivy requested review of this revision.Sat, Sep 20, 2:40 AM

I see one minor improvement that can be made to the code style, the change itself LGTM!

release/scripts/pkgbase-stage.lua
41

This whole condition could be simply if kernel_packages[package:match("(.*)%-dbg$")] then ... since foo[nil] is always nil in lua.

This would take us from 3 separate things that can get out of sync with each other (-4, "-dbg", and 1, -5) to a single thing.

The same goes for the duplicate code in pkgbase.in.

cperciva added inline comments.
release/scripts/pkgbase-stage.lua
41

Maybe this is just me being inexperienced with lua speaking, but I prefer the way Lexi wrote this simply because it's immediately clear what it means without needing to understand exactly what :match(glob) produces as output.

This revision is now accepted and ready to land.Tue, Sep 23, 8:21 PM
release/scripts/pkgbase-stage.lua
41

i have a mild preference for Isaac's version, but i'll go with whichever you like :-)

release/scripts/pkgbase-stage.lua
41

Isaac's version is fine, but maybe add a comment saying that the glob produces the package name sans -dbg or nil otherwise?

This revision was automatically updated to reflect the committed changes.