Message ID | a8c3f9aea215c7e47eaa57a8834854c2daafb027.1730462200.git.liezhi.yang@windriver.com |
---|---|
State | Accepted, archived |
Commit | 529043117a7c62feb45bc891658a412cc8dd7e3f |
Headers | show |
Series | [v2,1/1] cooker: Sort pn-buildlist | expand |
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 2e809866408..d58c0f575ce 100644 --- a/lib/bb/cooker.py +++ b/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: