On 21.01.2017 12:44, Richard Purdie wrote: > On Thu, 2017-01-19 at 10:16 +0100, Pascal Bach wrote: >> I would like to pass some additional data generated during the >> creation of a package to the image creation step. >> The idea is to use this data to generate a more detailed manifest of >> what is included in the image. In the concrete case >> I would like to pass a list of required copyright files that need to >> be checked for during image creation. >> >> My current approach is to add this list as a new variable COPYRIGHTS >> to the pkgdata of each package. >> Using the image manifest to determine the package this allows me to >> compile a list of all required copyrights. >> >> The following patch allows to add extra variables to pkgdata and thus >> allows to pass additional data >> >> - [PATCH] package.bbclass: allow additional variables to be added to >> >> Is this a valid approach or did a miss a simpler way to access any >> package data during image creation? > I'm curious if adding something to PACKAGEVARS would work or if not, > why not? Just adding it to PACKAGEVARS is not enough as the list of variables written to the pkgdata files is hard coded in emit_pkgdata here: https://github.com/openembedded/openembedded-core/blob/master/meta/classes/package.bbclass#L1365
However I notices an issue with the code as it seams the do_package step is not triggered if a variable in PACKAGE_EXTRA_PKGDATA changes. I'm not sure why as it should be added as a vardeps to the do_package task. For example if I add "COPYRIGHTS" to PACKAGE_EXTRA_PKGDATA and than change the COPYRIGHTS variable in a recipe the do_package step doesn't get executed. I'm trying to figure out why but if somebody can spot what I did wrong this would be appreciated. Pascal -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core