Skip to contentSkip to conversation

package.bbclass: Sort FILES_INFO by key

PATCH New Jacob Kroon 1 participant 1 message Jan 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package.bbclass: Sort FILES_INFO by key

Observing depsig.do_package for a package inbetween rebuilds indicated that FILES_INFO was changing content order randomly. Force it to be deterministic by sorting with respect to the keys when serializing.

---
 meta/classes/package.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package.bbclass +1 -1
index 0fe9576b4d..322c4ec77f 100644
@@ -1438,7 +1438,7 @@ fi
             if fstat.st_ino not in seen:
                 seen.add(fstat.st_ino)
                 total_size += fstat.st_size
-        d.setVar('FILES_INFO', json.dumps(files))
+        d.setVar('FILES_INFO', json.dumps(files, sort_keys=True))
 
         subdata_file = pkgdatadir + "/runtime/%s" % pkg
         sf = open(subdata_file, 'w')
Signature · 1 line
2.11.0