Finish the UNPACKDIR migration: remove remaining ${WORKDIR} uses in S - #132
Conversation
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>
23d92de to
0d27861
Compare
otavio
left a comment
There was a problem hiding this comment.
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.
Follow-up to #131, which fixed the three
recipes-core/updatehubrecipes on Whinlatter. Six recipes still setSusing${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
46480a5e66added ado_unpack[postfuncs]QA check with two fatals, both testing the unexpanded value ofS:S == "${WORKDIR}/git"or"${UNPACKDIR}/git"→ the assignment must be removed, not rewritten'${WORKDIR}' in S→ anything else containing${WORKDIR}Separately,
base_do_unpacklost its compatibility shim. Walnascar moved${UNPACKDIR}/<basedir>back to${WORKDIR}/<basedir>whenSstarted withWORKDIR; from Whinlatter on it only recognises paths already underUNPACKDIR. So these recipes are not merely lint-dirty — the source genuinely is not whereSpoints.Changes
One commit per recipe.
Git recipes — assignment removed.
BB_GIT_DEFAULT_DESTSUFFIX = "${BP}"withS = "${UNPACKDIR}/${BP}"means the checkout already lands where the defaultSpoints. None of these carry adestsuffix=override, so the resolved directory is unchanged.updatehub-sdk-qtupdatehub-active-inactive-backend-grub-toolsupdatehub-device-attributesfile://-only recipes —S = "${UNPACKDIR}". These carried the Walnascar idiomS = "${WORKDIR}/sources"+UNPACKDIR = "${S}".UNPACKDIRalready defaults to${WORKDIR}/sources, so the override was setting it to its own default and every resolved path is unchanged.updatehub-grub-scriptupdatehub-active-inactive-backend-grubupdatehub-active-inactive-backend-grub-efiAfter this,
git grep '${WORKDIR}'over all.bb/.bbappend/.inc/.bbclassin the layer returns nothing.Backports
Verified against each branch's own
bitbake.confandbase.bbclassrather than assumed:bitbake.confand same fataldo_qa_unpackas master; all six files are byte-identical, so it cherry-picks cleando_qa_unpackhas no${WORKDIR}check, andbase_do_unpackstill carries the shim that moves the unpacked dir back under${WORKDIR}UNPACKDIRat all;fetcher.unpack(WORKDIR), soS = "${WORKDIR}/git"is correct thereBackport PRs for wrynose and whinlatter follow.
Testing
Not built. Verified by inspection against Blacksail's
insane.bbclass,bitbake.confandbase.bbclass, and by confirming everydo_install/do_deploybody still resolves — the threefile://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.