Skip to content

Fix S/UNPACKDIR handling on Whinlatter - #131

Merged
otavio merged 3 commits into
whinlatterfrom
topic/whinlatter-unpackdir
Aug 7, 2026
Merged

otavio merged 3 commits into
whinlatterfrom
topic/whinlatter-unpackdir

Conversation

@otavio

@otavio otavio commented Aug 7, 2026

Copy link
Copy Markdown
Member

Building updatehub-rollback-guard on Whinlatter aborts during do_unpack:

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"
ERROR: Task (.../updatehub-rollback-guard.bb:do_unpack) failed with exit code '1'
WARNING: updatehub-callbacks-1.0-r0 do_unpack: updatehub-callbacks: the directory ${UNPACKDIR}/${BP} (.../sources/updatehub-callbacks-1.0) pointed to by the S variable doesn't exist - please set S within the recipe to point to where the source has been unpacked to

Cause

oe-core commit 46480a5e66 ("insane/do_qa_unpack: add checks that ensure S is set correctly") added a do_unpack[postfuncs] QA check that is fatal when the unexpanded value of S contains ${WORKDIR}. Whinlatter carries it — its do_qa_unpack body is byte-identical to master's — and defaults UNPACKDIR to ${WORKDIR}/sources with S = "${UNPACKDIR}/${BP}".

Two gaps line up on this branch:

  • updatehub-rollback-guard was added on master with S = "${UNPACKDIR}", but the Whinlatter backport (97c752a, updatehub-rollback-guard: Add guard for updates which never validate #129) rewrote it into the Walnascar idiom S = "${WORKDIR}/sources" + UNPACKDIR = "${S}" — the exact pattern the new check rejects.
  • The updatehub-callbacks and updatehub-sdk-statechange-trigger fixes 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. UNPACKDIR already defaults to ${WORKDIR}/sources on Whinlatter, so every resulting path is unchanged — this is purely about keeping the literal ${WORKDIR} out of S.

  • updatehub-callbacks — cherry-picked from f1977f0, authorship preserved
  • updatehub-sdk-statechange-trigger — squash of 9c84a9c + 9088377, authorship preserved. Not cherry-picked as a pair on purpose: 9c84a9c set S = "${UNPACKDIR}/sources", which 9088377 then corrected, and replaying that would leave a broken commit on the branch.
  • updatehub-rollback-guard — restores the master form

Other branches

Verified against each release's own oe-core, not assumed:

Branch Status
master, wrynose already correct (S = "${UNPACKDIR}")
whinlatter broken — this PR
walnascar correct as-is; UNPACKDIR defaults to ${WORKDIR}/sources-unpack there and its do_qa_unpack has no ${WORKDIR} check
scarthgap, nanbield, mickledore, langdale, kirkstone correct (S = "${WORKDIR}"; no UNPACKDIR in 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.bbclass and bitbake.conf, and by diffing the three recipes against their master counterparts.

mdrodrigo and others added 3 commits August 7, 2026 15:40
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 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

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.

@otavio
otavio merged commit 38b693a into whinlatter Aug 7, 2026
@otavio
otavio deleted the topic/whinlatter-unpackdir branch August 7, 2026 18:42
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.

2 participants