Skip to content

Finish the UNPACKDIR migration: remove remaining ${WORKDIR} uses in S - #132

Merged
otavio merged 6 commits into
masterfrom
topic/master-unpackdir
Aug 7, 2026
Merged

otavio merged 6 commits into
masterfrom
topic/master-unpackdir

Conversation

@otavio

@otavio otavio commented Aug 7, 2026

Copy link
Copy Markdown
Member

Follow-up to #131, which fixed the three recipes-core/updatehub recipes on Whinlatter. Six recipes still set S using ${WORKDIR} and are fatal on Blacksail/Wrynose/Whinlatter alike. #131 deliberately left them alone to avoid putting Whinlatter ahead of master; this is the master-first change.

Cause

oe-core 46480a5e66 added a do_unpack[postfuncs] QA check with two fatals, both testing the unexpanded value of S:

  • S == "${WORKDIR}/git" or "${UNPACKDIR}/git" → the assignment must be removed, not rewritten
  • '${WORKDIR}' in S → anything else containing ${WORKDIR}

Separately, base_do_unpack lost its compatibility shim. Walnascar moved ${UNPACKDIR}/<basedir> back to ${WORKDIR}/<basedir> when S started with WORKDIR; from Whinlatter on it only recognises paths already under UNPACKDIR. So these recipes are not merely lint-dirty — the source genuinely is not where S points.

Changes

One commit per recipe.

Git recipes — assignment removed. BB_GIT_DEFAULT_DESTSUFFIX = "${BP}" with S = "${UNPACKDIR}/${BP}" means the checkout already lands where the default S points. None of these carry a destsuffix= override, so the resolved directory is unchanged.

  • updatehub-sdk-qt
  • updatehub-active-inactive-backend-grub-tools
  • updatehub-device-attributes

file://-only recipes — S = "${UNPACKDIR}". These carried the Walnascar idiom S = "${WORKDIR}/sources" + UNPACKDIR = "${S}". UNPACKDIR already defaults to ${WORKDIR}/sources, so the override was setting it to its own default and every resolved path is unchanged.

  • updatehub-grub-script
  • updatehub-active-inactive-backend-grub
  • updatehub-active-inactive-backend-grub-efi

After this, git grep '${WORKDIR}' over all .bb/.bbappend/.inc/.bbclass in the layer returns nothing.

Backports

Verified against each branch's own bitbake.conf and base.bbclass rather than assumed:

Branch Needs this? Why
wrynose, whinlatter yes same bitbake.conf and same fatal do_qa_unpack as master; all six files are byte-identical, so it cherry-picks clean
walnascar no do_qa_unpack has no ${WORKDIR} check, and base_do_unpack still carries the shim that moves the unpacked dir back under ${WORKDIR}
scarthgap, kirkstone and older no no UNPACKDIR at all; fetcher.unpack(WORKDIR), so S = "${WORKDIR}/git" is correct there

Backport PRs for wrynose and whinlatter follow.

Testing

Not built. Verified by inspection against Blacksail's insane.bbclass, bitbake.conf and base.bbclass, and by confirming every do_install/do_deploy body still resolves — the three file:// recipes reference ${UNPACKDIR} explicitly or rely on cwd ${B} (= ${S} = ${UNPACKDIR}), and the git recipes rely on cwd ${B} (= ${S} = ${UNPACKDIR}/${BP}), which is the checkout.

otavio added 6 commits August 7, 2026 15:49
Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal for recipes that set S = "${WORKDIR}/git": the value bitbake.conf
derives now works on its own, as BB_GIT_DEFAULT_DESTSUFFIX is "${BP}"
and S defaults to "${UNPACKDIR}/${BP}", so the git checkout already
lands where S points.

Drop the assignment rather than rewriting it to ${UNPACKDIR}/git, which
the same check also rejects. SRC_URI carries no destsuffix override, so
the resolved source directory is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
…nment

Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal for recipes that set S = "${WORKDIR}/git": the value bitbake.conf
derives now works on its own, as BB_GIT_DEFAULT_DESTSUFFIX is "${BP}"
and S defaults to "${UNPACKDIR}/${BP}", so the git checkout already
lands where S points.

Drop the assignment rather than rewriting it to ${UNPACKDIR}/git, which
the same check also rejects. SRC_URI carries no destsuffix override, so
the resolved source directory is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal for recipes that set S = "${WORKDIR}/git": the value bitbake.conf
derives now works on its own, as BB_GIT_DEFAULT_DESTSUFFIX is "${BP}"
and S defaults to "${UNPACKDIR}/${BP}", so the git checkout already
lands where S points.

Drop the assignment rather than rewriting it to ${UNPACKDIR}/git, which
the same check also rejects. SRC_URI carries no destsuffix override, so
the resolved source directory is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal whenever the unexpanded value of S contains ${WORKDIR}. The recipe
still carried the Walnascar idiom of pointing S at ${WORKDIR}/sources and
then overriding UNPACKDIR to match, so it fails do_unpack outright.

Walnascar tolerated that idiom because base_do_unpack moved the unpacked
directory back under ${WORKDIR}; that compatibility shim is gone from
Whinlatter on, so the source is no longer where S points either.

Point S at ${UNPACKDIR} and drop the override. UNPACKDIR already defaults
to ${WORKDIR}/sources, so the resolved path is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal whenever the unexpanded value of S contains ${WORKDIR}. The recipe
still carried the Walnascar idiom of pointing S at ${WORKDIR}/sources and
then overriding UNPACKDIR to match, so it fails do_unpack outright.

Walnascar tolerated that idiom because base_do_unpack moved the unpacked
directory back under ${WORKDIR}; that compatibility shim is gone from
Whinlatter on, so the source is no longer where S points either.

Point S at ${UNPACKDIR} and drop the override. UNPACKDIR already defaults
to ${WORKDIR}/sources, so the resolved path is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Since oe-core 46480a5e66, carried from Whinlatter on, do_qa_unpack is
fatal whenever the unexpanded value of S contains ${WORKDIR}. The recipe
still carried the Walnascar idiom of pointing S at ${WORKDIR}/sources and
then overriding UNPACKDIR to match, so it fails do_unpack outright.

Walnascar tolerated that idiom because base_do_unpack moved the unpacked
directory back under ${WORKDIR}; that compatibility shim is gone from
Whinlatter on, so the source is no longer where S points either.

Point S at ${UNPACKDIR} and drop the override. UNPACKDIR already defaults
to ${WORKDIR}/sources, so the resolved path is unchanged.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>

@otavio otavio left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Checked against each release's own oe-core rather than extrapolating from master.

Two distinct failure modes, and the split is right. do_qa_unpack rejects S == "${WORKDIR}/git" and '${WORKDIR}' in S separately, and the first cannot be fixed by rewriting to ${UNPACKDIR}/git — that string is rejected too. So "remove the assignment" for the git recipes and "point at ${UNPACKDIR}" for the file:// ones are genuinely different fixes, correctly applied to the right recipes.

This is not cosmetic. Worth stating explicitly since the PR could read as lint-chasing: Walnascar's base_do_unpack moved ${UNPACKDIR}/<basedir> back to ${WORKDIR}/<basedir> whenever S started with WORKDIR, which is why the old idiom worked there. From Whinlatter on, base_do_unpack only recognises paths already under UNPACKDIR and the shim is gone. The source really is not where S points.

Git recipes verified individually. None carries a destsuffix=, so BB_GIT_DEFAULT_DESTSUFFIX = "${BP}" puts the checkout at ${UNPACKDIR}/${BP}, exactly the derived S. LIC_FILES_CHKSUM in all three resolves relative to S — file://COPYING for grub-tools and device-attributes, file://LICENSE for sdk-qt — and those files live in the checkout root, so the checksums still resolve. updatehub-sdk-qt inherits qmake5 and builds in B = ${S}, which is the checkout.

file:// recipes verified individually. updatehub-grub-script references ${UNPACKDIR}/grub.cfg explicitly in do_deploy. The two grub backends use a bare updatehub-grubenv.default in do_install, relying on cwd ${B} = ${S} = ${UNPACKDIR} — which is where a plain file:// fetch lands. Both still resolve.

No hidden references. git grep '${WORKDIR}' across .bb/.bbappend/.inc/.bbclass/.conf finds only these six S assignments — no task-body uses, which is the case oelint's oelint.vars.unpackdir rule misses. Zero matches remain after the change.

Commit hygiene. One recipe per commit with correct PN: prefixes, matching the existing 1c68053 / 82542ac "Remove S variable assignment" precedent in this layer.

Backport scope is verified, not assumed. Walnascar keeps the shim and has no ${WORKDIR} check in do_qa_unpack; Scarthgap and older have no UNPACKDIR and call fetcher.unpack(WORKDIR) directly. Backporting to any of them would actively break things. Correctly limited to Wrynose and Whinlatter.

Caveat

Not built — verification is by inspection plus cross-branch diffs. A bitbake updatehub-device-attributes updatehub-active-inactive-backend-grub-tools would be the cheapest confirmation, since those exercise both the git-checkout path and LIC_FILES_CHKSUM resolution.

Behaviour-preserving and completes the migration. Merge this before #133 and #134.

@otavio
otavio merged commit c8e4b4e into master Aug 7, 2026
@otavio
otavio deleted the topic/master-unpackdir branch August 7, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant