Fix S/UNPACKDIR handling on Whinlatter - #131
Conversation
Signed-off-by: Rodrigo M. Duarte <rodrigo.duarte@ossystems.com.br> (cherry picked from commit f1977f0) Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
…ake warnings
Whinlatter's oe-core makes do_qa_unpack fatal when the unexpanded value
of S contains ${WORKDIR}, and defaults UNPACKDIR to ${WORKDIR}/sources.
The recipe still carried the Walnascar idiom of pointing S at
${WORKDIR}/sources and then overriding UNPACKDIR to match, so it now
fails do_unpack outright.
Point S at ${UNPACKDIR} and drop the UNPACKDIR override, which resolves
to the same directory while keeping the literal ${WORKDIR} out of S.
This squashes 9c84a9c ("WORKDIR -> UNPACKDIR") and 9088377 ("Set the S
assignment to avoid bitbake warnings") from master; the former set S to
${UNPACKDIR}/sources, which the latter corrected, and replaying that
intermediate state would leave a broken commit on the branch.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
The recipe was introduced on master with S = "${UNPACKDIR}", but the
Whinlatter backport in 97c752a rewrote it into the Walnascar idiom of
pointing S at ${WORKDIR}/sources and overriding UNPACKDIR to match.
Whinlatter's oe-core carries do_qa_unpack from oe-core 46480a5e66,
attached as a do_unpack postfunc, which is fatal whenever the unexpanded
value of S contains ${WORKDIR}. Building the recipe therefore aborts:
ERROR: updatehub-rollback-guard-1.0-r0 do_unpack: S should be set
relative to UNPACKDIR, e.g. replace WORKDIR with UNPACKDIR in
"S = ${WORKDIR}/sources"
Restore the master form. UNPACKDIR already defaults to ${WORKDIR}/sources
on Whinlatter, so the resulting path is unchanged and do_install, which
references ${UNPACKDIR} directly, is unaffected.
The Walnascar idiom stays correct on that branch: its oe-core defaults
UNPACKDIR to ${WORKDIR}/sources-unpack and its do_qa_unpack has no
${WORKDIR} check, so the backport there needs no equivalent change.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
otavio
left a comment
There was a problem hiding this comment.
Review
Verified against Whinlatter's own oe-core rather than master's, since that was the thing actually in question.
Check is present and fatal on this branch. github/whinlatter:meta/classes-global/insane.bbclass carries do_qa_unpack with a body byte-identical to master's (diff → no output), wired at line 1526 as do_unpack[postfuncs] += "do_qa_unpack". That matches the failure being reported against do_unpack. Both fatals are live: S == "${WORKDIR}/git" and '${WORKDIR}' in S.
Paths are unchanged. github/whinlatter:meta/conf/bitbake.conf has UNPACKDIR ??= "${WORKDIR}/sources", so S = "${UNPACKDIR}" resolves to exactly what S = "${WORKDIR}/sources" + UNPACKDIR = "${S}" resolved to before. Dropping the UNPACKDIR override is safe because it was being set to its own default. B = "${S}" therefore also lands where it did.
No do_install fallout. All ${UNPACKDIR} references in the three recipes were checked; every one still resolves correctly. None of the recipes uses ${S} in a task body, and all three have do_configure/do_compile marked noexec, so B is inert.
No unpack-location surprises. All three recipes are plain file:// only — no subdir= or destsuffix= that could move where the fetcher lands files.
Hygiene. git diff --check clean; no mode changes, renames, or stray whitespace. LAYERSERIES_COMPAT_updatehub = "whinlatter" confirms the branch targets the right release. No .bbappend anywhere overrides S or UNPACKDIR for these recipes.
Older branches re-checked rather than assumed. Walnascar and Scarthgap both have a do_qa_unpack containing only the "directory doesn't exist" warning — no ${WORKDIR} fatal — so S = "${WORKDIR}/sources" on Walnascar and S = "${WORKDIR}" on Scarthgap and older stay correct. No backport needed there.
Commit split is right: one logical change per recipe, correct PN: prefixes, upstream authorship preserved on the two backports, and the 9c84a9c/9088377 squash is justified in the message rather than left implicit.
Not blocking
updatehub-device-attributes_git, updatehub-sdk-qt_git, updatehub-active-inactive-backend-grub{,-efi,-tools_git} and updatehub-grub-script still carry ${WORKDIR} and remain fatal on this branch. Whinlatter is not fully clean after this merge — but those are equally broken on master and Wrynose, so fixing them here would put Whinlatter ahead of master. Correctly deferred to a master-first change.
Caveat
Not built. Verification is by inspection against Whinlatter's insane.bbclass and bitbake.conf plus a byte-for-byte diff of the three recipes against master. Worth a bitbake updatehub-rollback-guard updatehub-callbacks updatehub-sdk-statechange-trigger on the failing setup to confirm.
Behaviour-preserving, minimal, and unblocks the reported do_unpack failure.
Building
updatehub-rollback-guardon Whinlatter aborts duringdo_unpack:Cause
oe-core commit
46480a5e66("insane/do_qa_unpack: add checks that ensure S is set correctly") added ado_unpack[postfuncs]QA check that is fatal when the unexpanded value ofScontains${WORKDIR}. Whinlatter carries it — itsdo_qa_unpackbody is byte-identical to master's — and defaultsUNPACKDIRto${WORKDIR}/sourceswithS = "${UNPACKDIR}/${BP}".Two gaps line up on this branch:
updatehub-rollback-guardwas added on master withS = "${UNPACKDIR}", but the Whinlatter backport (97c752a, updatehub-rollback-guard: Add guard for updates which never validate #129) rewrote it into the Walnascar idiomS = "${WORKDIR}/sources"+UNPACKDIR = "${S}"— the exact pattern the new check rejects.updatehub-callbacksandupdatehub-sdk-statechange-triggerfixes that landed on master and Wrynose (f1977f0,9c84a9c,9088377) were never backported here. The first causes the warning above; the second is the same latent fatal, one recipe over.Changes
All three recipes now match master byte-for-byte.
UNPACKDIRalready defaults to${WORKDIR}/sourceson Whinlatter, so every resulting path is unchanged — this is purely about keeping the literal${WORKDIR}out ofS.updatehub-callbacks— cherry-picked fromf1977f0, authorship preservedupdatehub-sdk-statechange-trigger— squash of9c84a9c+9088377, authorship preserved. Not cherry-picked as a pair on purpose:9c84a9csetS = "${UNPACKDIR}/sources", which9088377then corrected, and replaying that would leave a broken commit on the branch.updatehub-rollback-guard— restores the master formOther branches
Verified against each release's own oe-core, not assumed:
S = "${UNPACKDIR}")UNPACKDIRdefaults to${WORKDIR}/sources-unpackthere and itsdo_qa_unpackhas no${WORKDIR}checkS = "${WORKDIR}"; noUNPACKDIRin those releases)Out of scope
Six recipes still carry
${WORKDIR}and are fatal on whinlatter, wrynose and master alike —updatehub-grub-script,updatehub-active-inactive-backend-grub{,-efi},-grub-tools_git,updatehub-device-attributes_git,updatehub-sdk-qt_git. That is a layer-wide gap rather than a backport gap, so it belongs on master first and then flows down. Deliberately not touched here to avoid putting Whinlatter ahead of master.Testing
Not built. The change is verified by inspection against Whinlatter's
insane.bbclassandbitbake.conf, and by diffing the three recipes against their master counterparts.