image_types_resin.bbclass: Replace deprecated variable IMAGE_DEPENDS
image_types_resin.bbclass: Replace deprecated variable IMAGE_DEPENDS

Poky Rocko has deprecated the IMAGE_DEPENDS variable.

Added dependencies to do_deploy tasks for target packages and do_populate_sysroot for native packages.
The exception from this is when grub is a target package. If we use do_deploy for grub, bitbake errors out:

Exception: FileExistsError: [Errno 17] File exists: '.../tmp/sysroots-components/x86_64/grub-efi-native/usr/bin/grub-mkimage' -> '.../tmp/work/genericx86_64-poky-linux/resin-image/1.0-r0/recipe-sysroot-native/usr/bin/grub-mkimage'

Some boards may define multiple bootloaders. An example:

https://github.com/resin-os/resin-intel/blob/master/layers/meta-resin-genericx86/recipes-core/images/resin-image.inc#L12

Given the above facts, we also needed to process the bootloader list and append the appropriate do_populate_sysroot task to
each bootloader found in the list. See https://patchwork.openembedded.org/patch/138223/ for this.

Plus, this commit fixes these additional bitbake errors:

resin-image.bb: Deprecated variable(s) found: "IMAGE_DEPENDS_resinos-img, IMAGE_DEPENDS_hostapp-ext4". Use do_image_<type>[depends] += "<recipe>:<task>" instead
resin-image-flasher.bb: Deprecated variable(s) found: "IMAGE_DEPENDS_resinos-img". Use do_image_<type>[depends] += "<recipe>:<task>" instead

Change-type: patch
Changelog-entry: Replace deprecated variable IMAGE_DEPENDS from image_types_resin.bbclass
Signed-off-by: Florin Sarbu <3a837a37a2ac9072a088641ec330e0e5d5b86f4e@resin.io>

resin-os/meta-resin,resin-os/meta-resin,resin-os/meta-resin,resin-os/meta-resin