All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1][v3] base.bbclass: show layer's branches/revisions in the banner info
@ 2011-07-02 15:23 Dexuan Cui
  2011-07-02 15:23 ` [PATCH 1/1][v3]base.bbclass: " Dexuan Cui
  2011-07-05 12:41 ` [PATCH 0/1][v3] base.bbclass: " Richard Purdie
  0 siblings, 2 replies; 3+ messages in thread
From: Dexuan Cui @ 2011-07-02 15:23 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit a1f79a7896b6411669b3ccada6204d2695e80fc5:

  runqueue.py: Add umask task control (2011-06-24 12:23:12 +0100)

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

Dexuan Cui (1):
  base.bbclass: show layer's branches/revisions in the banner info

 meta/classes/base.bbclass |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

-- 
1.7.6




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

* [PATCH 1/1][v3]base.bbclass: show layer's branches/revisions in the banner info
  2011-07-02 15:23 [PATCH 0/1][v3] base.bbclass: show layer's branches/revisions in the banner info Dexuan Cui
@ 2011-07-02 15:23 ` Dexuan Cui
  2011-07-05 12:41 ` [PATCH 0/1][v3] base.bbclass: " Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Dexuan Cui @ 2011-07-02 15:23 UTC (permalink / raw)
  To: openembedded-core

The patch removes METADATA_BRANCH and METADATA_REVISION, and treats the meta/
in the same way as other layers.
In the case some layers belonging to the same repo, the branch and revision
are only printed once, but all the layer names are still printed.

An example output can be:

OE Build Configuration:
BB_VERSION        = "1.13.1"
TARGET_ARCH       = "i586"
TARGET_OS         = "linux"
MACHINE           = "emenlow"
DISTRO            = "poky"
DISTRO_VERSION    = "1.0+snapshot-20110702"
TARGET_FPU        = ""
meta
meta-yocto        = "dcui/banner_v3:4b712dba68a98c827b8f3d0242da9153c4f65473"
meta-emenlow
meta-sugarbay
meta-n450         = "dcui/test1:76d1178ba1a43cf6457c89717134aeb9f1275fae"

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
---
 meta/classes/base.bbclass |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 119b052..87fdb74 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -166,8 +166,29 @@ python base_eventhandler() {
 
 	if name.startswith("BuildStarted"):
 		bb.data.setVar( 'BB_VERSION', bb.__version__, e.data )
-		statusvars = ['BB_VERSION', 'METADATA_BRANCH', 'METADATA_REVISION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TARGET_FPU']
+		statusvars = ['BB_VERSION', 'TARGET_ARCH', 'TARGET_OS', 'MACHINE', 'DISTRO', 'DISTRO_VERSION','TARGET_FPU']
 		statuslines = ["%-17s = \"%s\"" % (i, bb.data.getVar(i, e.data, 1) or '') for i in statusvars]
+
+		layers = (data.getVar("BBLAYERS", e.data, 1) or "").split()
+		layers_branch_rev = ["%-17s = \"%s:%s\"" % (os.path.basename(i), \
+			base_get_metadata_git_branch(i, None).strip(), \
+			base_get_metadata_git_revision(i, None)) \
+				for i in layers]
+		i = len(layers_branch_rev)-1
+		p1 = layers_branch_rev[i].find("=")
+		s1= layers_branch_rev[i][p1:]
+		while i > 0:
+			p2 = layers_branch_rev[i-1].find("=")
+			s2= layers_branch_rev[i-1][p2:]
+			if s1 == s2:
+				layers_branch_rev[i-1] = layers_branch_rev[i-1][0:p2]
+				i -= 1
+			else:
+				i -= 1
+				p1 = layers_branch_rev[i].find("=")
+				s1= layers_branch_rev[i][p1:]
+
+		statuslines += layers_branch_rev
 		statusmsg = "\nOE Build Configuration:\n%s\n" % '\n'.join(statuslines)
 		print statusmsg
 
-- 
1.7.6




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

* Re: [PATCH 0/1][v3] base.bbclass: show layer's branches/revisions in the banner info
  2011-07-02 15:23 [PATCH 0/1][v3] base.bbclass: show layer's branches/revisions in the banner info Dexuan Cui
  2011-07-02 15:23 ` [PATCH 1/1][v3]base.bbclass: " Dexuan Cui
@ 2011-07-05 12:41 ` Richard Purdie
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2011-07-05 12:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Sat, 2011-07-02 at 23:23 +0800, Dexuan Cui wrote:
> The following changes since commit a1f79a7896b6411669b3ccada6204d2695e80fc5:
> 
>   runqueue.py: Add umask task control (2011-06-24 12:23:12 +0100)
> 
> are available in the git repository at:
>   git://git.pokylinux.org/poky-contrib dcui/banner_v3
>   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dcui/banner_v3
> 
> Dexuan Cui (1):
>   base.bbclass: show layer's branches/revisions in the banner info

Merged to master, thanks.

Richard




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

end of thread, other threads:[~2011-07-05 12:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-02 15:23 [PATCH 0/1][v3] base.bbclass: show layer's branches/revisions in the banner info Dexuan Cui
2011-07-02 15:23 ` [PATCH 1/1][v3]base.bbclass: " Dexuan Cui
2011-07-05 12:41 ` [PATCH 0/1][v3] base.bbclass: " Richard Purdie

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.