Difference in installing process

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Difference in installing process

Jump to solution
2,204 Views
imx7newbie
Contributor II

Hi,

While creating yocto recipe, What is difference between

IMAGE_INSTALL_append = "packagename"

and

IMAGE_INSTALL += "packagename"

Regards

Labels (1)
Tags (2)
1 Solution
1,947 Views
Carlos_Musich
NXP Employee
NXP Employee

The simplest way to add extra packages to all images is by using the IMAGE_INSTALL variable with the _append operator:

     IMAGE_INSTALL_append = " strace"


Use of the syntax is important. Specifically, the space between the quote and the package name, which is strace in this example. This space is required since the _append operator does not add the space.

Furthermore, you must use _append instead of the += operator if you want to avoid ordering issues.

However, the reference manual is a little unclear on what "ordering issues" means. += works just fine, it's just that if you happen to use it at some point before core-image.bbclass line sets it with ?= (i.e. either in local.conf or before the "inherit core-image" line in your image recipe) the ?= line in core-image.bbclass will do nothing and you'll end up with much less in the IMAGE_INSTALL list than you expected. If you use _append, you can have that anywhere you like and it will always work, with the caveat that if you forget to add a leading space in the value to be appended, things will break.


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

1 Reply
1,948 Views
Carlos_Musich
NXP Employee
NXP Employee

The simplest way to add extra packages to all images is by using the IMAGE_INSTALL variable with the _append operator:

     IMAGE_INSTALL_append = " strace"


Use of the syntax is important. Specifically, the space between the quote and the package name, which is strace in this example. This space is required since the _append operator does not add the space.

Furthermore, you must use _append instead of the += operator if you want to avoid ordering issues.

However, the reference manual is a little unclear on what "ordering issues" means. += works just fine, it's just that if you happen to use it at some point before core-image.bbclass line sets it with ?= (i.e. either in local.conf or before the "inherit core-image" line in your image recipe) the ?= line in core-image.bbclass will do nothing and you'll end up with much less in the IMAGE_INSTALL list than you expected. If you use _append, you can have that anywhere you like and it will always work, with the caveat that if you forget to add a leading space in the value to be appended, things will break.


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------