fix(linux/build): symlink /home/user/derivative-maker to checkout (M1.1 iter23)
Run #4270's Build A made it 2:40 deep — past sanity-tests, prepare- build-machine, local-deps, into 2100_create-debian-packages — then died on: + /workspace/.../genmkfile/usr/bin/genmkfile reprepro-remove running: dm-reprepro-wrapper remove local age-api + /usr/bin/dm-reprepro-wrapper: line 28: /home/user/derivative-maker/help-steps/pre: No such file or directory Earlier `dm-reprepro-wrapper includedsc/includedeb` calls succeeded because 2100_create-debian-packages invokes them by absolute path (`$source_code_folder_dist/packages/.../developer-meta-files/usr/bin/ dm-reprepro-wrapper`) — the in-repo copy resolves help-steps/pre relative to its own location. `genmkfile reprepro-remove` calls `dm-reprepro-wrapper` via PATH instead, so the system copy at /usr/bin/dm-reprepro-wrapper wins. That copy was installed by 1500_local-deps `apt install`-ing the in-repo developer-meta-files.deb into the silvermetal-builder image at runtime. The .deb's intended layout assumes the matching derivative-maker checkout lives at /home/user/derivative-maker — the upstream-blessed path. Ours is at /workspace/SilverLABS/SilverMetal/linux/build/ derivative-maker, so the relative source() at line 28 walks off into nowhere. Bridge the gap with a symlink at the start of build-inner.sh: ln -sfn "${REPO_ROOT}/linux/build/derivative-maker" \ /home/user/derivative-maker That keeps our self-referential CI bind-mount topology (we still cd into REPO_ROOT/.../derivative-maker, derivative-maker still computes paths relative to itself), but also makes the system copy of dm-reprepro-wrapper find help-steps/pre and friends. Both reprepro wrappers (in-repo and system-installed) now resolve to the same files via the symlink, so the silvermetal-reprepro-wrap.sh PATH precedence shadow at /usr/local/bin/reprepro keeps applying to both code paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,21 @@ if [ -d /usr/share/keyrings ]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# Bridge the upstream-blessed checkout path.
|
||||
# 1500_local-deps installs the in-repo `developer-meta-files.deb` system-
|
||||
# wide. That deb ships /usr/bin/dm-reprepro-wrapper, which begins with
|
||||
# source "${0%/*}/../../help-steps/pre"
|
||||
# resolved against the install location (/usr/bin) and a user_name-relative
|
||||
# layout that lands at /home/user/derivative-maker/help-steps/pre.
|
||||
# When 2100_create-debian-packages calls `dm-reprepro-wrapper` via PATH
|
||||
# (e.g. through `genmkfile reprepro-remove`), the system copy wins over
|
||||
# the in-repo one, and the source fails:
|
||||
# /usr/bin/dm-reprepro-wrapper: line 28:
|
||||
# /home/user/derivative-maker/help-steps/pre: No such file or directory
|
||||
# Make /home/user/derivative-maker resolve to our actual checkout so both
|
||||
# the in-repo and system-installed wrappers find the same support files.
|
||||
ln -sfn "${REPO_ROOT}/linux/build/derivative-maker" /home/user/derivative-maker
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
source "${REPO_ROOT}/linux/build/config/silvermetal-base.conf"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user