Skip to content

chore(install): non-blocking cleanups from the Sub-spec 3 reviews #117

Description

@Bugs5382

Non-blocking cleanups noted during the Sub-spec 3 reviews (#115). None affect correctness in the maintenance image; grouping them so they don't get lost.

  • Use os.RemoveAll instead of os.Remove for scratch mountpoint cleanup in internal/init/bootmedia_linux.go, internal/init/maintenance_installer.go, and internal/init/espstage_linux.go. The directories are empty on those paths today, so os.Remove works, but RemoveAll is the safe idiom for a mountpoint.
  • waitForDevice in internal/install/install.go treats every os.Stat error as "device not appeared yet" and spins the full timeout. It should return immediately on any error other than os.IsNotExist, so a permission error surfaces quickly (matters in restricted test environments, not the real root image).
  • install.StageConfig writes without an fsync. It is consistent with CopyFile and the umount flushes, so this is only worth revisiting if the write path changes.
  • Test coverage and cosmetic items: a duplicate configload test case (_StagePresent_NotFirstBoot mirrors _NoPersisted); TestInstall_Validation no longer covers the empty-mountDir guard; TestInstall_SequenceAndCopy does not assert reread-before-mount ordering; the reboot-handoff comments attribute response-flush safety to send-ordering when it actually comes from GracefulStop; the integration ESP-offset helper assumes 512-byte sectors; build/dosfstools/build.sh configure lacks --disable-shared (the PT_INTERP gate still enforces staticness) and a libpopt comment may be inaccurate.

Metadata

Metadata

Assignees

Labels

enhancementNew feature (feat). Minor version bump.

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions