Skip to content

Commit

Permalink
o/devicestate: correctly construct KernelBootInfo from model that is …
Browse files Browse the repository at this point in the history
…being installed, not current device context
  • Loading branch information
andrewphelpsj committed Feb 4, 2025
1 parent d69103c commit 70a55cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion overlord/devicestate/devicestate_install_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (s *deviceMgrInstallAPISuite) testInstallFinishStep(c *C, opts finishStepOp
Name: "pc-kernel",
Revision: snap.R(1),
MountPoint: kernelMountDir,
IsCore: false,
IsCore: !opts.installClassic,
ModulesComps: modulesComps,
NeedsDriversTree: true,
})
Expand Down
6 changes: 1 addition & 5 deletions overlord/devicestate/handlers_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -1076,13 +1076,9 @@ func (m *DeviceManager) doInstallFinish(t *state.Task, _ *tomb.Tomb) error {

snapInfos := systemAndSnaps.InfosByType
snapSeeds := systemAndSnaps.SeedSnapsByType
deviceCtx, err := DeviceCtx(st, t, nil)
if err != nil {
return fmt.Errorf("cannot get device context: %v", err)
}

// Find out kernel-modules components in the seed
isCore := !deviceCtx.Classic()
isCore := !systemAndSnaps.Model.Classic()
kBootInfo := kBootInfo(systemAndSnaps, kernMntPoint, mntPtForComps, isCore)

logger.Debugf("writing content to partitions")
Expand Down

0 comments on commit 70a55cb

Please sign in to comment.