Skip to content

Commit 430b9a2

Browse files
vscode: compute S prefix in Python instead of UNPACKDIR=WORKDIR
The first cut at this fix set UNPACKDIR ??= ${WORKDIR} so kirkstone / scarthgap (which don't define UNPACKDIR) would still work, but bitbake.conf on styhead+ rejects the literal 'UNPACKDIR = ${WORKDIR}' assignment ('Using UNPACKDIR = ${WORKDIR} is not supported'). Compute the prefix via a Python expression instead: use UNPACKDIR if the release has set one, fall back to WORKDIR otherwise. Same end result on every supported release without tripping the assertion.
1 parent 10d6751 commit 430b9a2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

recipes-devtools/vscode/vscode_1.120.0.bb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ SRC_URI[vscode-x64.sha256sum] = "510426eb23d330bf25d84fe88e49a08d965d6b21957b8
4444
SRC_URI[vscode-arm64.sha256sum] = "69c0d1d0534cd4173e2b3dbee5d001ed5c2bd0c846bb22dca917312b64eb1baf"
4545
SRC_URI[vscode-armhf.sha256sum] = "1662d3dd08a3602544bc4ca1b091e04d5393a23414607b7c34f0570ebd0d5daa"
4646

47-
# Whinlatter+ split WORKDIR / UNPACKDIR; tarballs land under UNPACKDIR
48-
# while WORKDIR is now reserved for build artefacts. Older releases
49-
# (kirkstone..walnascar) didn't have UNPACKDIR at all -- give it a
50-
# WORKDIR fallback so the recipe works on every supported release.
51-
UNPACKDIR ??= "${WORKDIR}"
52-
S = "${UNPACKDIR}/VSCode-linux-${VSCODE_ARCH}"
47+
# Styhead+ introduced UNPACKDIR as the directory do_unpack writes to,
48+
# distinct from WORKDIR which is reserved for build artefacts. We have
49+
# to source S from UNPACKDIR on those releases; on kirkstone/scarthgap
50+
# UNPACKDIR isn't defined, so fall back to WORKDIR. A literal
51+
# UNPACKDIR = ${WORKDIR} assignment is rejected by bitbake.conf's QA
52+
# on styhead+, so compute the prefix via Python instead.
53+
S = "${@(d.getVar('UNPACKDIR') or d.getVar('WORKDIR'))}/VSCode-linux-${VSCODE_ARCH}"
5354

5455
# These are arch-specific prebuilt ELFs, not noarch content; bin_package
5556
# inherits allarch which is wrong here. Override back to per-machine

0 commit comments

Comments
 (0)