From 041a0e8dff1daf333613f3dd06a9bfc218213462 Mon Sep 17 00:00:00 2001 From: Robert Yang Date: Thu, 21 Jun 2012 10:28:54 +0800 Subject: bitbake: bitbake/cooker: Print which pkgs would be built in -g output This is for giving the user a clear list to show which pkg would be built, we have the "bitbake -g", but it is not easy to read for people, it is for "dot". Improve the "bitbake -g" to also save a pn-buildlist: $ bitbake -g core-image-sato ... NOTE: PN build list saved to 'pn-buildlist' [snip] The contents of pn-buildlist: busybox shadow-native pth sysfsutils qemu-helper-native curl-native ncurses-native gdbm xserver-xorg linux-libc-headers [snip] [YOCTO #2404] (Bitbake rev: 18aff925aece774d0172894e25584353519ca03f) Signed-off-by: Robert Yang Signed-off-by: Richard Purdie --- bitbake/lib/bb/cooker.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 9b8d4b23e5..361bc88a9d 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -534,11 +534,15 @@ class BBCooker: # Prints a flattened form of package-depends below where subpackages of a package are merged into the main pn depends_file = file('pn-depends.dot', 'w' ) + buildlist_file = file('pn-buildlist', 'w' ) print("digraph depends {", file=depends_file) for pn in depgraph["pn"]: fn = depgraph["pn"][pn]["filename"] version = depgraph["pn"][pn]["version"] print('"%s" [label="%s %s\\n%s"]' % (pn, pn, version, fn), file=depends_file) + print("%s" % pn, file=buildlist_file) + buildlist_file.close() + logger.info("PN build list saved to 'pn-buildlist'") for pn in depgraph["depends"]: for depend in depgraph["depends"][pn]: print('"%s" -> "%s"' % (pn, depend), file=depends_file) -- cgit v1.2.3-54-g00ecf