Commit 0f8c676
committed
rootfs cache: refresh configng every build; fingerprint tier + hash into cache_type
Two bugs that conspired to make 'new configng commit but still
served the old rootfs from cache' the default behaviour.
1. The fetch_from_repo for armbian-configng was gated inside the
'[[ -z $DESKTOP_ENVIRONMENT ]]' branch of
interactive_desktop_main_configuration, so it only fired when
the user picked a DE from the interactive dialog. Every
non-interactive build (CI, items-from-inventory, scripted
local with DESKTOP_ENVIRONMENT= pre-set) skipped the fetch —
which left whatever stale clone happened to live in
cache/sources/armbian-configng/ as the source of truth for
the CONFIGNG_DESKTOPS_HASH input.
Hoist the fetch + parser-path sanity check up above the gate
so every BUILD_DESKTOP=yes invocation pulls branch:main.
fetch_from_repo is idempotent on an already-cloned tree
(just a git pull) so the warm-cache cost is one up-to-date
check.
2. The resolved rootfs tarball filename is
rootfs-<arch>-<release>-<cache_type>_<yyyymm>-<cache_id>.tar.zst.
cache_id = packages_hash came from AGGREGATED_ROOTFS_HASH +
hook hash + bash hash — none of which see armbian-configng.
cache_type encoded DESKTOP_ENVIRONMENT ('xfce-desktop',
'gnome-desktop', …) but not DESKTOP_TIER and not any
fingerprint of the configng tree. Consequences:
- A tier=minimal rootfs and a tier=full rootfs for the same
DE collided on one filename. Whichever built first got
cached; every subsequent tier silently reused its tarball.
- A configng commit that changed which packages a DE
installs (yaml edit, tier_override bump, new browser
mapping) produced a different CONFIGNG_DESKTOPS_HASH in
artifact_input_variables, but the local tarball was still
named the same, so the lookup kept hitting the pre-change
artifact.
Fold both into cache_type. Net rename:
rootfs-arm64-trixie-xfce-desktop_…tar.zst
→
rootfs-arm64-trixie-xfce-desktop-mid-a1b2c3d4_…tar.zst
8-char suffix is the configng commit prefix. Only injected
for BUILD_DESKTOP=yes; only when the value is a real SHA
(not the 'undetermined' / 'unknown' sentinels the
computation falls back to on clone failures).1 parent 465162d commit 0f8c676
2 files changed
Lines changed: 64 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
33 | 62 | | |
34 | 63 | | |
35 | 64 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 65 | | |
50 | 66 | | |
51 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
42 | 77 | | |
43 | 78 | | |
44 | 79 | | |
| |||
0 commit comments