From 43435bc2e49ba74c09c929558c8a9053e19d11a7 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 25 Jul 2017 15:58:09 -0400 Subject: [PATCH] image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDs When we have more than one CONVERSION_CMD being used, for example ext4.gz.sha256sum we will see errors about "metadata is not deterministic". This is because we do not have a stable order of intermediate files that will be removed in the generated shell command. We fix this by calling sorted() on the set of rm_tmp_images so that we will have a stable hash again. Cc: Patrick Ohly (From OE-Core rev: 26feb0580642ef8934206ea73cdce9e1f73d14ef) Signed-off-by: Tom Rini Signed-off-by: Richard Purdie (cherry picked from commit 98a2afeb3a53bec7a72a4a9846e1dba636cc6f3d) Signed-off-by: Armin Kuster Signed-off-by: Richard Purdie --- meta/classes/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 4b208c94f1..ef2b38aeaf 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -484,7 +484,7 @@ python () { # Clean up after applying all conversion commands. Some of them might # use the same input, therefore we cannot delete sooner without applying # some complex dependency analysis. - for image in rm_tmp_images: + for image in sorted(rm_tmp_images): cmds.append("\trm " + image) after = 'do_image'