Skip to content

Commit 26943c7

Browse files
committed
test(e2e): an inherited subos comes with the ledger that registers its assets
_inherit_toolchain.sh linked the user's subos into the test home but not the version ledger that registers the assets its workspace projects. xlings checks those before it changes the sysroot, so every install that touched it was refused ("Scrt1.o@glibc-2.44.3: installed asset registration missing"): e2e 32, 33 and 40 on a runner whose ~/.mcpp held no mcpplibs.cmdline.
1 parent 879a3af commit 26943c7

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎tests/e2e/_inherit_toolchain.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,13 @@ if [[ "${MCPP_INHERIT_SUBOS:-1}" != "0" && -d "$USER_MCPP/registry/subos" ]]; th
8383
[[ -e "$MCPP_HOME/registry/subos" ]] \
8484
|| ln -sf "$USER_MCPP/registry/subos" "$MCPP_HOME/registry/subos" 2>/dev/null \
8585
|| cp -r "$USER_MCPP/registry/subos" "$MCPP_HOME/registry/subos"
86+
# The subos's workspace names the assets it projects (glibc's Scrt1.o,
87+
# ...), and xlings checks each one against the home's version ledger
88+
# before it changes the sysroot. A ledger without them refuses every
89+
# install that touches the sysroot ("installed asset registration
90+
# missing"), so the inherited subos comes with a copy of the ledger.
91+
[[ -e "$MCPP_HOME/registry/.xlings.json" || ! -f "$USER_MCPP/registry/.xlings.json" ]] \
92+
|| cp -f "$USER_MCPP/registry/.xlings.json" "$MCPP_HOME/registry/.xlings.json"
8693
fi
8794
if [[ "${MCPP_INHERIT_CONFIG:-1}" != "0" && -f "$USER_MCPP/config.toml" ]]; then
8895
cp -f "$USER_MCPP/config.toml" "$MCPP_HOME/config.toml" 2>/dev/null || true

0 commit comments

Comments
 (0)