Repository navigation
fix(arch): --needed in the bootstrap, so it stops reinstalling curl - #481
Merged
Merged
Conversation
The arch distro entity's container bootstrap ran pacman-key --init && pacman -Syu --noconfirm with no --needed. The base image already ships curl and ca-certificates at the target version, so pacman REINSTALLED both on every single build of every Arch-family image: warning: curl-8.21.0-1 is up to date -- reinstalling warning: ca-certificates-20240618-1 is up to date -- reinstalling Wasted work in the first layer of every build, and two warnings in every build log that no allowlist claims -- the existing `pacman-needed-package-already-current` rule covers `-- skipping`, which is the message pacman prints WITH --needed. --needed is the flag that makes a repeated install idempotent instead of a reinstall (R4). Every other pac install path in charly already passes it, including the generated install template three hundred lines down and the cachyos bootstrap in the next block. arch was the outlier. Measured on the exact base image the bootstrap runs against: without --needed: 2 reinstalling, 0 skipping with --needed: 0 reinstalling, 2 skipping, curl still present Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
This was referenced Aug 30, 2026
Merged
Contributor
Review — PASSHead SHA: Security screen: PASS — single config-string change ( Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
archdistro entity's container bootstrap ranwith no
--needed. The base image already shipscurlandca-certificatesat thetarget version, so pacman reinstalled both on every single build of every Arch-family
image:
Wasted work in the first layer of every build, and two warnings in every build log that
no allowlist claims — the existing
pacman-needed-package-already-currentrule covers-- skipping, which is the message pacman prints with--needed.Every file in the diff
charly/charly.ymlarch.distro.bootstrap.install_cmdgains--needed, with the measurement recorded inlineWhy this is the right fix rather than an allowlist entry
--neededis the flag that makes a repeated install idempotent instead of a reinstall —which is R4, and which the allowlist rule's own comment already says. Adding
-- reinstallingto the allowlist would have silenced the message while leaving the wastedreinstall in place on every build.
Every other pac install path in charly already passes it: the generated install template
three hundred lines further down reads
pacman -Syu --noconfirm --needed{{range .Options}}…, and thecachyosbootstrap in thenext block has it too. arch was the outlier.
How tested
Measured on the exact base image the bootstrap runs against
(
quay.io/archlinux/archlinux:base-20260719.0.558306), both ways:2 reinstalls → 0, the two remaining lines are the
-- skippingclass that isallowlisted, and curl is still present — so the fix removes the work without removing
the outcome. That last line matters: a
--neededthat skipped a package the bootstrapactually needs would be a regression, and this asserts it does not.
How it was found
Not by reading the entity. By auditing a real bed's warning accounting in
.check/<bed>/<ts>/summary.yml, where each finding carries theallowlisted:rule ID thatclaimed it. Two findings had no rule, and their text differed from the 23 that did by a
single word:
reinstallinginstead ofskipping. Following that word back reached thismissing flag.
Rulebook compliance
/charly-internals:git-workflow.rather than allowlisted. The tempting fix — adding
-- reinstallingto the allowlist rule— would have hidden the symptom and kept the waste.
bootstrap that already do this, rather than adding a third spelling.
--neededis precisely the idempotence flag R4 asks for.N/A — one flag added; nothing removed.main, PR-only, noforce-push, no direct push to
main, no hook bypass.real base image and count real output, including the assertion that curl still arrives.
N/A — no artifact.N/A — the evidence is pacman's own output, not charly's.--rmcontainer fromthe pinned base image, so neither can be contaminated by the other.
N/A — one flag in a distro entity.Change classification
both forms, and the outcome it must preserve was asserted.
Assisted-by: Claude Code claude-opus-5[1m] (fully tested and validated)