From 0884c31b1b60f34f3d3db3ab110b4e506bcc9160 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Fri, 1 Nov 2024 04:58:57 -0700 Subject: bitbake: cooker: Sort pn-buildlist So that we can compare the different pn-buildlist easily. (Bitbake rev: 529043117a7c62feb45bc891658a412cc8dd7e3f) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 2e80986640..d58c0f575c 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -900,10 +900,11 @@ class BBCooker: depgraph = self.generateTaskDepTreeData(pkgs_to_build, task) - with open('pn-buildlist', 'w') as f: - for pn in depgraph["pn"]: - f.write(pn + "\n") - logger.info("PN build list saved to 'pn-buildlist'") + pns = depgraph["pn"].keys() + if pns: + with open('pn-buildlist', 'w') as f: + f.write("%s\n" % "\n".join(sorted(pns))) + logger.info("PN build list saved to 'pn-buildlist'") # Remove old format output files to ensure no confusion with stale data try: -- cgit v1.2.3-54-g00ecf