| Summary: | BBCLASSEXTEND doesn't handle overrides with suffixed ${PN} for native class | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Denys Dmytriyenko <denis> |
| Component: | core | Assignee: | Christos Gavros <gavrosc> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | gavrosc, meta.mr.watcher, meta.watcher, richard.purdie |
| Version: | unspecified | ||
| Target Milestone: | 5.2 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
Hi
I ran some tests and my conclusions are:
- I applied the proposed patch but didnt work. The vim native related package that is generated is called ‘vim-native’ in the location /build/tmp/work/x86_64-linux. I couldn't find any packages called 'vim-native-xxd' or 'vim-xxd-native'
- I tried the following solution and worked without errors. It is not a proper solution, just to understand how the mechanism works.
In vim recipe i added the line RPROVIDES:${PN} ="xxd-native"
In another recipe i added the line RDEPENDS:${PN} += "xxd-native"
- I tried to add code in native.bbclass to set a value to RPROVIDES:vim-native = “xxd-native” in order to avoid any changes in the recipes (and then find a general solution later). I got the same error.
- I tested the same case with other recipes like 'atk-native' and 'kbd-native'. Both failed as vim.
- The error is generated at the end of the build procedure when the task “do_rootfs” is running for the image at all of the above occasions.
Is it supposed that recipes can use RDEPENDS (e.g. RDEPENDS:${PN} += "packageName-native") to native packages of other recipes ?
Has this been tested in the past?
Br
Christos
I replied to the list with a different patch which changes the native.bbclass extension code to better handle this corner case. It does create new issues though. (In reply to Christos Gavros from comment #1) > I ran some tests and my conclusions are: > > - I applied the proposed patch but didnt work. The vim native related > package that is generated is called ‘vim-native’ in the location > /build/tmp/work/x86_64-linux. I couldn't find any packages called > 'vim-native-xxd' or 'vim-xxd-native' > > - I tried the following solution and worked without errors. It is not a > proper solution, just to understand how the mechanism works. > In vim recipe i added the line RPROVIDES:${PN} ="xxd-native" > In another recipe i added the line RDEPENDS:${PN} += "xxd-native" > > - I tried to add code in native.bbclass to set a value to > RPROVIDES:vim-native = “xxd-native” in order to avoid any changes in the > recipes (and then find a general solution later). I got the same error. > > - I tested the same case with other recipes like 'atk-native' and > 'kbd-native'. Both failed as vim. > > - The error is generated at the end of the build procedure when the task > “do_rootfs” is running for the image at all of the above > occasions. > > Is it supposed that recipes can use RDEPENDS (e.g. RDEPENDS:${PN} += > "packageName-native") to native packages of other recipes ? > > Has this been tested in the past? It is intended that if a recipe has: RDEPENDS:${PN}-xxx = "yyy" then a native version of the recipe would have a dependency on yyy-native added. As you say, native recipes don't have packages but they do have dependencies for their populate_sysroot task (which is where a native would get run). So, we can not have in a recipe the following statement, right ?
RDEPENDS:${PN}-xxx = “yyy-native”
We can not use RDEPENDS between a runtime package of recipe ‘A’ and the native package of recipe ‘B’, is that right?
If we use RDEPENDS for the runtime packages then the dependency for equivalent native recipes shall be implied
(In reply to Christos Gavros from comment #4) > So, we can not have in a recipe the following statement, right ? > > RDEPENDS:${PN}-xxx = “yyy-native” > > We can not use RDEPENDS between a runtime package of recipe ‘A’ and the > native package of recipe ‘B’, is that right? > If we use RDEPENDS for the runtime packages then the dependency for > equivalent native recipes shall be implied https://docs.yoctoproject.org/ref-manual/variables.html#term-BBCLASSEXTEND BBCLASSEXTEND is supposed to handle all this automatically, hence the issue... (In reply to Christos Gavros from comment #4) > So, we can not have in a recipe the following statement, right ? > > RDEPENDS:${PN}-xxx = “yyy-native” > > We can not use RDEPENDS between a runtime package of recipe ‘A’ and the > native package of recipe ‘B’, is that right? > If we use RDEPENDS for the runtime packages then the dependency for > equivalent native recipes shall be implied Such a requirement doesn't make sense, no. the patch is merged in master: https://git.openembedded.org/openembedded-core/commit/?id=e2fd81e221c25fc21d532e020ddd8aaac0c22ede |
BBCLASSEXTEND doesn't handle overrides with suffixed ${PN} for native class More details in the discussion on the list: https://lists.openembedded.org/g/openembedded-core/topic/109930389#msg208471