mirror of
https://github.com/Klipper4FlashForge/firmware.git
synced 2026-10-22 05:12:16 -05:00
Give apk a version it can parse in CI, and say so when it cannot
ci.yml writes MOD_VER=ci into config.env, and MOD_VER is anvil-core's PKG_VERSION. apk's version grammar wants a digit first, so mkpkg refused it -- with "info field 'version' has invalid value", naming neither the package nor the value nor where it came from. A free-form version was fine for .ipk, which is why the line survived the migration unread. MOD_VER=0 now. It is pinned rather than left to the date default so two runs of one tree produce the same bytes, and 0 says "not a release" as plainly as the word did while ordering below every real version. emit_apk checks the version before calling mkpkg and names the package, the offending value and the config.env setting to fix. The grammar test covers the recipes, and could not have caught this: the value comes from config.env, so anvil-core answers with whatever the machine running the test happens to say -- a date, locally, always valid. The new gate reads MOD_VER out of the workflow files themselves, which is the only place that value is written down, with a companion asserting a workflow still pins one at all so the check cannot pass by having nothing to check. busybox's pkg.conf expanded $BUSYBOX_BIN bare and let a failed sha256sum through a pipeline. Sourced under `set -euo pipefail` it therefore failed -- correctly skipping the recipe, since pkg_recipes evaluates PKG_WHEN in a subshell, but printing "BUSYBOX_BIN: unbound variable" twice into every CI log immediately above the first real failure, where it reads like the cause. With that fixed every recipe reads under the build's own flags, so the unsigned-recipe gate now covers all of them rather than only the ones a build would make: a recipe that cannot be read is dropped by that subshell rather than reported, so the failure mode is a package silently leaving the feed. Verified with the production key: 290 static, 135 replica, 47 signed packages and a payload. MOD_VER=ci reproduced locally against the new message, and MOD_VER=0 built and pruned clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rbKEyLXrzSE6wm3iNApVp
This commit is contained in:
1 parent
734a04db45
commit
f11b63b6c1
4 files changed
+108
-9
No files matched your search
@@ -198,7 +198,13 @@ jobs:
|
||||
run: |
|
||||
cat > config.env <<'CFG'
|
||||
MOD_NAME=anvil
|
||||
MOD_VER=ci
|
||||
# 0, NOT "ci": MOD_VER is anvil-core's PKG_VERSION, and apk's version
|
||||
# grammar wants a number first -- `ci` is rejected by mkpkg with
|
||||
# "package version is invalid" and no clue which package or field.
|
||||
# It is pinned rather than left to default so two runs of one tree
|
||||
# produce the same bytes; 0 says "not a release" as plainly as the
|
||||
# word did, and orders below every real one.
|
||||
MOD_VER=0
|
||||
TARGET_MACHINE=Creator5Pro
|
||||
# No stock paths: bin/common.sh defaults them into vendor/, where
|
||||
# `make vendor` puts the pinned download. Setting them here would be
|
||||
|
||||
Reference in new issue
Block a user