Skip to content

os/rootfs/Dockerfile: is the apt-lists justification still true under RAUC? #870

Description

@VijitSingh97

What

os/rootfs/Dockerfile:35-36 deliberately keeps the apt lists in the image and explains why:

# NB: apt lists are kept on purpose — the Rugix core recipes run `apt-get install` in the build
# chroot (fdisk/parted etc.) and need resolvable metadata; deleting them fails the bake.

That reason belonged to the Rugix candidate. Under RAUC, os/rauc/mkimage.sh does the partitioning and filesystem work with host tools against a loop device — it does not apt-get install inside the exported rootfs. So the stated cause of the failure no longer exists on the shipped path.

Why it matters

Two ways this can go wrong, in opposite directions:

  • If the lists are genuinely no longer needed, the image carries dead weight in every slot and every update bundle, kept alive by a comment nobody will question because it sounds authoritative.
  • If they are still needed for some reason other than the one written down, the next person to read this comment, check that RAUC does not chroot-install, and delete the lists will break the bake — and the comment will have actively misled them.

Either way the comment is currently the only thing holding the decision, and it is arguing from a system that was replaced.

What to do

Build the rootfs with the lists removed (rm -rf /var/lib/apt/lists/* in the same layer) and run os/rauc/mkimage.sh plus tests/os/verify-image.sh against the result. Then either drop them and note the size saved, or keep them and rewrite the comment to say the real reason.

Left untouched by the develop-v2 quality pass (PR #867) on purpose — it is a build question, not a reading, and guessing at the answer in a comment would have reproduced the original defect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appliancePithead OS appliance work — lands on feat/phase2-bakery-imagerefactorCode health / tech debt; no behavior change

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions