Bug 7879

Summary: Similar recipe names cause problems with PN auto setting (usability issue)
Product: [Build System, Metadata & Runtime] BitBake Reporter: Igor Stoppa <igor.stoppa>
Component: bitbakeAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Medium CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: unspecified   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Igor Stoppa 2015-06-11 09:32:59 UTC
Premise:

* I have created a custom layer
* Inside this layer, I have a recipe named baseos_initrd.bb
* This recipe pulls in another one, located in the same place, through PACKAGE_INSTALL.

Expectation:

* this should work regardless of the name of the 2nd recipe


Finding:

* if the name of the 2nd recipe is a subset of the name of the first (I had tried baseos_init.bb), I get the error:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'baseos_init' (but /home/igor/dev/iot-os/meta-iot-os-filesystem/recipes-image/images/baseos_initrd.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'baseos_init' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['baseos_init']
ERROR: Required build target 'baseos_initrd' has no buildable providers.
Missing or unbuildable dependency chain was: ['baseos_initrd', 'baseos_init']


* if the 2nd recipe has a totally different name (myinitrd.bb), then the build succeeds
Comment 1 Igor Stoppa 2015-06-11 09:43:41 UTC
More findings: init_for_baseos didn't work, while baseosinit worked :-o
Comment 2 Richard Purdie 2015-06-11 15:12:53 UTC
I think the issue here is that the "magic" which pulls the name and version number (PN, PV, PR) from the .bb file name is confusing things. The simple fix is either to set PN/PV/PR manually and use your existing filename or use a different filename.

Obviously the user feedback about what is happening here is confusing and could be better, the bug is therefore open to look into ways we could make this less confusing for the user.
Comment 3 Randy MacLeod 2023-09-21 15:00:59 UTC
The code that checks on the name and version is performance critical so we can't just always check for errors. Perhaps there could be a linter...
Comment 4 Randy MacLeod 2023-10-24 14:24:29 UTC
Bulk move from 4.99 or 0.00 to 5.99