All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] print which pkgs would be built
@ 2012-06-21  2:28 Robert Yang
  2012-06-21  2:28 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2012-06-21  2:28 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

Hi Paul,

This is for:

* The ability to know what pkgs will be *compiled* for a given image. 

For the "installed" part, use the core-image-sato as an example, which
will install 395 rpm binary pkgs:

Note:
The following ones has filtered out the "-dev/-dbg/-staticdev/-natives":

1) If we only grab the RDEPENDS, there are only 342 pkgs, which is less
than 395

2) If we grab both the RDEPENDS and RRECOMMENDS, there are 476 pkgs,
which is more than 395

The problem is that there is a RCONFLICTS, the RRECOMMENDS and
RCONFLICTS will be used by the package manager to determine which pkg
would be installed, this makes it hard to predict the pkg that will be
installed.

// Robert

The following changes since commit e0a70547069fe7e8a2d6bdaffc985fb172d46c31:

  perl: Allow perl to cross build and native build in a directory named "t" (2012-06-18 17:33:04 +0100)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/buildlist
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/buildlist

Robert Yang (1):
  print which pkgs would be built

 bitbake/bin/bitbake      |    2 +-
 bitbake/lib/bb/cooker.py |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)




^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] print which pkgs would be built
  2012-06-21  2:28 [PATCH 0/1] print which pkgs would be built Robert Yang
@ 2012-06-21  2:28 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2012-06-21  2:28 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Zhenfeng.Zhao

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]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/bin/bitbake      |    2 +-
 bitbake/lib/bb/cooker.py |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index 478ac06..5ddc28c 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -145,7 +145,7 @@ Default BBFILES are the .bb files in the current directory.""")
     parser.add_option("-e", "--environment", help = "show the global or per-package environment (this is what used to be bbread)",
                action = "store_true", dest = "show_environment", default = False)
 
-    parser.add_option("-g", "--graphviz", help = "emit the dependency trees of the specified packages in the dot syntax",
+    parser.add_option("-g", "--graphviz", help = "emit the dependency trees of the specified packages in the dot syntax, and the pn-buildlist to show the build list",
                 action = "store_true", dest = "dot_graph", default = False)
 
     parser.add_option("-I", "--ignore-deps", help = """Assume these dependencies don't exist and are already provided (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more appealing""",
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 928b600..a9aae5c 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)
-- 
1.7.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-21  2:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-21  2:28 [PATCH 0/1] print which pkgs would be built Robert Yang
2012-06-21  2:28 ` [PATCH 1/1] " Robert Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.