| Summary: | Incorrect dependencies for -native recipes | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Richard Purdie <richard.purdie> |
| Component: | core | Assignee: | Richard Purdie <richard.purdie> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, otavio, tomasz.dziendzielski |
| Version: | 1.6 | ||
| Target Milestone: | Future | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
Can't we just get subpackages names with:
>sorted((key for key in d.keys() if key.startswith("RDEPENDS_")))
?
Then how do we map package from RDEPENDS to recipe name that we should add to DEPENDS? For example if we have RDEPENDS_y = "z-dev" how to get "z" the correct way?
(In reply to comment #1) > Can't we just get subpackages names with: > >sorted((key for key in d.keys() if key.startswith("RDEPENDS_"))) > ? In theory we could however iterating d.keys() is extremely expensive and even in bitbake, we avoid it at all costs. There is a much simpler way which is not to clear PACKAGES in the native case, then not only could we do the above more efficiently, but bitbake itself already handles it for us. > Then how do we map package from RDEPENDS to recipe name that we should add > to DEPENDS? For example if we have RDEPENDS_y = "z-dev" how to get "z" the > correct way? Bitbake already handles this internally for the target recipe cases so we're just going to use the same mechanism for the native case. The way it works is that bitbake knows about PACKAGES and can therefore know that z-dev is provided by a specific recipe. |
If we have a recipe PN = "x" which has RDEPENDS_y = "z" (where y is a subpackage of x) and then we build x-native, it doesn't have a dependency on z-native. This is due to the way native.bbclass extends recipes to a native version. It will look at: RDEPENDS_x and RDEPENDS_${PN} as well as RDEPENDS but it will not look at subpackages. Extending it to cover subpackages is non-trivial, not least that PACKAGES="" in native.bbclass.