A set of image environment variables can be used in exec-pre and exec-post. This "image environment" is specific to the image being generated. image_generate() calls itself recursively to resolve dependencies. Because setenv_image() is called before image_generate(), the set image environment is wrong as soon as image_generate() calls itself.
Fix that by setting the image environment inside image_generate() after the point it might call itself for dependency resolution. This way the image environment is always correct.
A set of image environment variables can be used in
exec-pre
andexec-post
. This "image environment" is specific to the image being generated.image_generate()
calls itself recursively to resolve dependencies. Becausesetenv_image()
is called beforeimage_generate()
, the set image environment is wrong as soon asimage_generate()
calls itself.Fix that by setting the image environment inside
image_generate(
) after the point it might call itself for dependency resolution. This way the image environment is always correct.