Hi Stefan,
On Fri, Mar 27, 2020 at 06:41:57AM -0700, [email protected] wrote:
> Hi Quentin,
> I have now read up on the exact meaning of PROVIDES and PACKAGES and I do
> understand your response.
> It does sound like I am talking about PACKAGES since I did suspect PROVIDES
> to work like that.
> Well at least if PROVIDES would work like that, it would explain why my
> postinstall did not work previously.
>
> But I did use PROVIDES, which I now know is basically just a alias.
>
> Here is the situation I had before and how I solved it:
>
> Previous attempt:
> *my_recipe.bb:*
> ...
> PROVIDES += "my_recipes_package"
Your recipe can now be used in DEPENDS of other recipes with both "my-recipe"
and "my-recipe-package". N.B.: please do not use underscore in recipe
names, it can have weird consequences (been there, trust me). I assume
it's only for the sake of an example so it's fine.
> RPROVIDES_${PN} += "my_recipes_package"
>
Here, you mean, ${PN} (packaged named my-recipe which is the main
package usually) can also be known as my-recipes-package, it's another
alias, for different thing but still nothing crazy.
> pkg_postinst_ontarget_${PN} () {
> #!/bin/sh
> file=$D/home/root/test/test.txt
> printf "hello world\n" > $file
> }
>
> *my_image.bb:*
> IMAGE_INSTALL += " my_recipes_package "
>
"Please install my-recipes-package which is an alias to my-recipe
package."
This actually seems okay to me. So if no typo and no underscore, I'm
clueless.
Can you try that exact same recipe but with:
pkg_postinst_ontarget_my-recipes-package instead of
pkg_postinst_ontarget_${PN} ()?
And another try, with the exact same recipe (so not the modification
asked above), with IMAGE_INSTALL += "my-recipe"?
In any case, this seems to me to be bug that should be reported.
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#48956): https://lists.yoctoproject.org/g/yocto/message/48956
Mute This Topic: https://lists.yoctoproject.org/mt/72582932/21656
Mute #yocto: https://lists.yoctoproject.org/mk?hashtag=yocto&subid=6691583
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-