base.bbclass: rstrip the git branch/revision.
authorChris Larson <clarson@mvista.com>
Mon, 23 Mar 2009 22:40:22 +0000 (15:40 -0700)
committerChris Larson <clarson@mvista.com>
Mon, 23 Mar 2009 22:40:22 +0000 (15:40 -0700)
Signed-off-by: Chris Larson <clarson@mvista.com>
classes/base.bbclass

index 919d01d..9ec705b 100644 (file)
@@ -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>"