← Back to issue list

refactor: remove the now-unused chroot and loop device helpers

View original Github issue

Metadata

Project
imagecraft
Number
#417
Type
pull request
State
open
Author
lengau
Labels
Created
Updated
Closed

Current evaluation

Removes unused chroot handler and loop device helpers after GRUB installation was refactored to work without root privileges. Part 7 of a 7-part stack. No reviewer engagement yet.

Suggested action: needs review

Reason: This is Part 7 (final) of a stack refactoring GRUB installation to work without root privileges. The PR removes dead code (chroot.py, loop device helpers) with no reviewer engagement after 23 days. It's a straightforward cleanup PR that should be reviewed and merged to complete the stack.

Impact: 50 Quick Win: 35.0 Staleness: 45 Complexity: 30 Confidence: 70

Issue body

Part 7 (final) of a stack that makes GRUB installation work without root privileges. Pure deletion. With both GRUB paths converted, the chroot handler and the loop device helpers on `Image` have no callers left, so this removes: - `imagecraft/pack/chroot.py` and its tests - `Image.attach_loopdev` and the loop device plumbing behind it - the now-unused `ChrootError` / `ChrootMountError` / `ChrootExecutionError` `imagecraft.pack.image.Image` is now just a description of the image being built. Note this is only the *pack* side. The loop device handling in the image **service** is untouched, since that is still used to write the partitions themselves. Also bumps the ubuntu-24.04 spread workers from 2 to 4, which is now safe because the GRUB tests no longer contend for privileged global resources such as loop devices.

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 50
Quick Win: 35.0
Staleness: 45
Complexity: 30
Confidence: 70
needs review Removes unused chroot handler and loop device helpers after GRUB installation was refactored to work without root privileges. Part 7 of a 7-part stack. No reviewer engagement yet.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 30
Confidence: 85
needs review Removes unused chroot and loop device helpers after GRUB path conversion. Part of a stack to enable non-root GRUB installation. Currently pending maintainer review with 1 unresolved comment and passing CI.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 10
Confidence: 85
needs review Removes unused chroot and loop device helpers following GRUB installation refactoring. Awaiting maintainer review with one unresolved comment and passing CI.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 5
Confidence: 90
needs review Removes unused chroot and loop device helpers after GRUB path conversion. Part of a stack to enable rootless GRUB installation. Currently pending maintainer review with one unresolved comment and passing CI.
qwen/qwen3.6-35b-a3b
Staleness: 10
Complexity: 15
Confidence: 85
needs review Removes unused chroot and loop device helpers following GRUB installation refactoring. PR is pending maintainer review with mostly passing CI and one security scan failure.
qwen/qwen3.6-35b-a3b
Staleness: 10
Complexity: 10
Confidence: 85
needs review Removes unused chroot and loop device helpers after GRUB installation was refactored to work without root privileges. Currently pending maintainer review with mixed CI results.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 85
needs review Removes unused chroot and loop device helpers as part of a GRUB installation refactoring stack. Currently pending maintainer review with mixed CI results.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 5
Confidence: 80
needs review Cleanup PR removing unused chroot and loop device helpers after GRUB installation refactoring. Currently pending maintainer review with mixed CI status.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 10
Confidence: 85
needs review Removes unused chroot and loop device helpers after GRUB installation was refactored to work without root privileges. Currently pending maintainer review with CI passing.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 10
Confidence: 85
needs review Removes unused chroot and loop device helpers from the pack module after GRUB installation was refactored to work without root privileges. Currently awaiting maintainer review with mixed CI status.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Removes unused chroot and loop device helpers after GRUB installation refactoring. Deletes related files and functions, bumps spread workers, and cleans up the Image class. Currently pending maintainer review with passing CI.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 30
Confidence: 85
needs review Removes unused chroot and loop device helpers after GRUB installation refactoring. Part 7 of a stack enabling non-root GRUB installs. CI passing, awaiting maintainer review.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Removes unused chroot and loop device helpers following GRUB path conversion. All CI checks pass. Awaiting maintainer review.
qwen/qwen3.6-35b-a3b
Staleness: 5
Complexity: 15
Confidence: 90
needs review Removes unused chroot and loop device helpers after GRUB installation was refactored to work without root privileges. Also increases spread workers. Currently pending maintainer review with passing CI.

Update history

Date Change
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
updated
created

Related work

  • Related To: canonical/imagecraft#416 (confidence 85%)

    Part 6 of the same stack, also open and under review with 3 unresolved comments. This PR depends on the stack being reviewed together.

Related issues

Issue Project State Summary Similarity
#416 feat(grub): install BIOS GRUB without loop devices or chroot imagecraft open Part 6 of a stack refactoring GRUB BIOS/MBR installation to work without root privileges, removing chroot and loop device dependencies. Under review with 3 unresolved comments.
79%
#348 No loops for grub imagecraft open Refactors grub handling to avoid loop devices, replacing special handling with a more generic approach. Stalled for 100 days pending maintainer feedback on architectural direction.
72%
#434 feat(grub): loop-device-free EFI GRUB setup imagecraft open Part of a GRUB refactoring stack implementing loop-device-free EFI GRUB setup. Fresh PR with 7 unresolved review comments and no maintainer engagement yet.
70%