Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDs
@ 2017-07-25 19:58 Tom Rini
  2017-07-26  5:57 ` Patrick Ohly
  2017-09-15  7:41 ` Martin Hundebøll
  0 siblings, 2 replies; 6+ messages in thread
From: Tom Rini @ 2017-07-25 19:58 UTC (permalink / raw)
  To: openembedded-core

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 <patrick.ohly@intel.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 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 b095bca..dee17ae 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -474,7 +474,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'
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-19  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 19:58 [PATCH] image: Fix "metadata is not deterministic" when chaining 2+ CONVERSION_CMDs Tom Rini
2017-07-26  5:57 ` Patrick Ohly
2017-09-15  7:41 ` Martin Hundebøll
2017-09-15 12:16   ` Tom Rini
2017-09-15 18:20     ` Martin Hundebøll
2017-09-19  9:08       ` Martin Hundebøll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox