| Summary: | bitbake-layers: unable to determine layer when BBFILES points to a subdirectory | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] BitBake | Reporter: | Paul Eggleton <bluelightning> |
| Component: | bitbake | Assignee: | Paul Eggleton <bluelightning> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | liezhi.yang, patrick.ohly, poky.bs.watcher, poky.watcher |
| Version: | 1.8 | ||
| Target Milestone: | 1.9 M3 | ||
| Hardware: | All | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | Regression (Used to work) |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Paul Eggleton
2015-08-14 10:12:16 UTC
Additionally the get_file_layer() function in lib/bb/utils.py (which is the same function rewritten to be usable from the metadata) will need a similar fix for the same issue. If practical it would be nice if we could have just one function. 4a09c91ce4a0b040a71a49d741d10fc850e887fa did not add the BBFILE_PATTERN match, that goes back further.
What 4a09c91ce4a0b040a71a49d741d10fc850e887fa adds is the (IMHO) awkward re.match(layerdir, filename) which isn't really a regular expression match because layerdir is a path name. A better way to write that check would be filename.startswith(layerdir), although that's also based on an assumption ("a layer must contain its recipe files").
Technically, a layer may also add files to BBPATH which are elsewhere.
You're right, the regex.match on layerdir + /test was before that and would have contributed to this. We do need to map through BBFILES yes or this will continue to have issues, but that's not the whole picture as I mentioned as that won't work with classes or conf files that are found through BBPATH. |