Commit 7eaba04
committed
configng: refresh clone once, early — fix matrix-prep cache fingerprint
Three coupled changes that together fix "I pushed to configng but the
new image still has the old YAML":
1) New helper `fetch_armbian_configng()` in
lib/functions/configuration/config-desktop.sh. Idempotent wrapper
around `fetch_from_repo` (mirror-friendly via GITHUB_SOURCE),
returns early if BUILD_DESKTOP != yes, save/restores PWD, declares
the locals fetch_from_repo writes to so they don't leak.
2) Call the helper from BOTH prep_conf_main_build_single (line 31,
right after do_main_configuration) AND prep_conf_main_minimal_ni
(line 73, same position). Previously only the full-build path
ran the fetch via interactive_desktop_main_configuration; the
json-info / matrix-prep path (cli-jsoninfo) silently used a
stale or absent clone.
3) Revert artifact_rootfs_config_dump to a read-only consumer of
the now-guaranteed-fresh on-disk clone. No fetch in there, no
mid-flow side effects per artifact. Keeps the info-level
breadcrumb that logs short-hash + commit subject.
Also fixes a latent bug in git_ensure_safe_directory
(lib/functions/general/git.sh): the gate on `[[ -e "$1/.git" ]]`
caused safe.directory to be silently skipped when fetch_from_repo
prepared a fresh work tree before `git init`. The subsequent
checkout/clean then failed with "fatal: detected dubious ownership"
in Docker-volume-mounted setups where the parent directory has a
non-matching uid. Dropping the gate makes the add unconditional;
setting safe.directory on a non-git path is harmless.
Net effect: every code path that reads CONFIGNG_DESKTOPS_HASH
now sees the actual HEAD of armbian-configng, the
artifact_full_oci_target resolves correctly, CI's remote-cache
lookup hits the right (or correctly-missing) tag, and full builds
under Docker stop hitting the safe-directory wall.1 parent 657d31f commit 7eaba04
4 files changed
Lines changed: 74 additions & 23 deletions
File tree
- lib/functions
- artifacts
- configuration
- general
- main
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
23 | 31 | | |
24 | 32 | | |
25 | 33 | | |
26 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 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 | + | |
28 | 57 | | |
29 | 58 | | |
30 | 59 | | |
31 | 60 | | |
32 | 61 | | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
52 | 68 | | |
53 | 69 | | |
54 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
31 | 39 | | |
32 | 40 | | |
33 | 41 | | |
| |||
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
75 | 91 | | |
76 | 92 | | |
77 | 93 | | |
| |||
0 commit comments