Bug 12677

Summary: devtool modify <recipe> errors out when the recipe uses ${WORKDIR} in do_install
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Anuj Mittal <anuj.mittal>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: anuj.mittal, ccasciato, denis, meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie, sgw, stephano
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Anuj Mittal 2018-04-11 23:29:10 UTC
Since devtool uses externalsrc to override vars B and S, references to WORKDIR in do_install result in failures.

Is using WORKDIR to resolve to file paths a valid usage? If not, should we warn users and request them to change it when using such a recipe with devtool? Is there any other way to replace references to WORKDIR?
Comment 1 Paul Eggleton 2018-10-23 22:43:43 UTC
Anuj - apologies for the delay in reviewing this. Do you have an example of a recipe where this resulted in a failure? I just tested a couple that I found with ${WORKDIR} in do_install (nss and keymaps in OE-Core) and they worked fine, so I think there are additional factors at work here - perhaps S = "${WORKDIR}" or otherwise using ${WORKDIR}/something to refer to a file within ${S} or ${B}?
Comment 2 Anuj Mittal 2018-10-24 01:02:57 UTC
(In reply to comment #1)
> Anuj - apologies for the delay in reviewing this. Do you have an example of
> a recipe where this resulted in a failure? 

At the time, I was working on ixgbe recipe in meta-intel.

> I just tested a couple that I
> found with ${WORKDIR} in do_install (nss and keymaps in OE-Core) and they
> worked fine, so I think there are additional factors at work here - perhaps
> S = "${WORKDIR}" or otherwise using ${WORKDIR}/something to refer to a file
> within ${S} or ${B}?

Yes, I just checked and this recipe is using ${WORKDIR}/something to refer to a file in source tree.
Comment 3 Denys Dmytriyenko 2022-09-08 20:48:12 UTC
FWIW, this is still a valid bug:
https://patchwork.yoctoproject.org/project/ti/patch/20220908202054.3800302-1-denis@denix.org/

Should devtool at least warn about such usage?
Also, should this be re-assigned to Saul (new devtool owner) now?
Comment 4 Randy MacLeod 2023-10-24 14:24:27 UTC
Bulk move from 4.99 or 0.00 to 5.99
Comment 5 Randy MacLeod 2026-01-22 16:31:15 UTC
Needs retesting after the UNPACKDIR changes.