[oe-commits] Chris Larson : base.bbclass: rstrip the git branch/revision.

GIT User account git at amethyst.openembedded.net
Mon Mar 23 22:50:50 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 6ddd16d877b167b929b5a64a2e01d2e6be161b15
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=6ddd16d877b167b929b5a64a2e01d2e6be161b15

Author: Chris Larson <clarson at mvista.com>
Date:   Mon Mar 23 15:40:22 2009 -0700

base.bbclass: rstrip the git branch/revision.

Signed-off-by: Chris Larson <clarson at mvista.com>

---

 classes/base.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index 919d01d..9ec705b 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -870,7 +870,7 @@ def base_get_metadata_svn_revision(path, d):
 
 def base_get_metadata_git_branch(path, d):
 	import os
-	branch = os.popen('cd %s; git symbolic-ref HEAD' % path).read()
+	branch = os.popen('cd %s; git symbolic-ref HEAD' % path).read().rstrip()
 
 	if len(branch) != 0:
 		return branch.replace("refs/heads/", "")
@@ -878,7 +878,7 @@ def base_get_metadata_git_branch(path, d):
 
 def base_get_metadata_git_revision(path, d):
 	import os
-	rev = os.popen("cd %s; git show-ref HEAD" % path).read().split(" ")[0]
+	rev = os.popen("cd %s; git show-ref HEAD" % path).read().split(" ")[0].rstrip()
 	if len(rev) != 0:
 		return rev
 	return "<unknown>"





More information about the Openembedded-commits mailing list