]> code.ossystems Code Review - openembedded-core.git/commit
native.bbclass: Do not remove "-native" in the middle of recipe names
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Mon, 31 May 2021 20:34:04 +0000 (22:34 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Jun 2021 13:03:28 +0000 (14:03 +0100)
commitedaf8ff278fc96b122c4fc3266b63856e3350f4c
treecad6af79479adc787ac4f372afb3cbf65608a72b
parent701ef7ff0e1b17150424a64acfafbb83f518f9c9
native.bbclass: Do not remove "-native" in the middle of recipe names

For dependencies such as "${PN}-foo", when modifying them for native
recipes, it is expected that they become "${BPN}-foo-native" rather
than "${BPN}-native-foo-native". This was previously done by removing
all occurences of "-native" from the dependency before adding
"-native" at the end. However, this fails for a recipe such as
"crate-native-tls" that happens to contain the string "-native" in the
middle of the name. Solve this by simply replacing ${PN} with ${BPN}
in the name instead before adding "-native" at the end

Also simplify adding "-native" to the end of names the recipe provides.
In this case it is not necessary to replace ${PN} with ${BPN} as the
recipes are expected to use ${BPN}-foo in the first place.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/native.bbclass