Message ID | 1e929963b51ca2f66bb2b35c550627da70fd7f3c.1730455481.git.liezhi.yang@windriver.com |
---|---|
State | Accepted, archived |
Commit | 529043117a7c62feb45bc891658a412cc8dd7e3f |
Headers | show |
Series | [1/1] cooker: Sort pn-buildlist | expand |
On 11/1/24 18:05, Robert Yang via lists.openembedded.org wrote: > From: Robert Yang <liezhi.yang@windriver.com> > > So that we can compare the different pn-buildlist easily. > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > lib/bb/cooker.py | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py > index 2e80986640..37a5cada28 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("\n".join(sorted(pns))) Sorry, the above line missed a '\n' in the eol, I will send a V2 for it. // Robert > + logger.info("PN build list saved to 'pn-buildlist'") > > # Remove old format output files to ensure no confusion with stale data > try: > > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#16765): https://lists.openembedded.org/g/bitbake-devel/message/16765 > Mute This Topic: https://lists.openembedded.org/mt/109330363/7304958 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [liezhi.yang@eng.windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 2e80986640..37a5cada28 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("\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: