I assume that the code you posted is not a recipe of its own but part of an image recipe, e.g. a recipe which does have the do_rootfs and friends tasks.
That because all three sections IMAGE_INSTALL*, extrausers, ROOTFS_POSTPROCESS_COMMAND make only sense in an image recipe but I do not see that you inherit image directly or indirectly.
If that assumptions is correct I do not see what would make ROOTFS_POSTPROCESS_COMMAND fail. Could you try the following:
Adding a space between the closing brace and the opening curly brace:
update_sudoers() {
Running the bitbake command with -e and checking the output for anything strange in the update_sudoers and ROOTFS_POSTPROCESS_COMMAND definitions.
bitbake your-image-recipe -e > image.txt
What is the command line you use to build your image?
There is no mentioning of update_sudoers in the textfile. Your definitions must be part of the recipe which creates the image and not have it in a separate recipe. So either add to the image recipe or add it to conf/local.conf.
You have to add the content of the recipe you posted above
either to
a new file angstrom-lxde-image.bbappend
or to
angstrom-lxde-image.bb
or to
conf/local.conf
I am building the Tezi image from the source. The tag I am using is “Colibri-iMX7_LXDE-Image_2.8b6.184-20190401” . This recipe is part of our customization. Does this clarify your doubts?
I have added a space before the curly bracket. Also, I have noticed that the recipe does not add sudo command in the rootfs. Neither it adds the extra user.
Thanks for your reply. I have already added this recipe to my local.conf in the “IMAGE_INSTALL_append” section. Isn’t this correct ? My recipe name is “add-custom-user.bb” .And I have added this recipe as follows.
But it does not have any effect.
IMAGE_INSTALL_append= " add-custom-user "
Also I forgot to tell you that after adding the space before curly bracket in function name, the error was gone but still it seems that the "ROOTFS_POSTPROCESS_COMMAND ’ does not apply my function, ‘update_sudoers’