summaryrefslogtreecommitdiffstats
path: root/meta/classes/metadata_scm.bbclass
diff options
context:
space:
mode:
authorJoe Sauer <jsauer@vernier.com>2010-06-08 19:54:26 (GMT)
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-08 19:54:26 (GMT)
commit47e5d86aad1ae96ba9c1af3ce5d7323e21b3f7fe (patch)
treefb16707f917cf2ef4c820ce4c4d2c7766af39001 /meta/classes/metadata_scm.bbclass
parentf47eeddbd692ac3c6109c18c9f04a3ad4dc789ba (diff)
downloadpoky-47e5d86aad1ae96ba9c1af3ce5d7323e21b3f7fe.tar.gz
metadata_scm.bbclass: Make errors quiet if we're not in a git based scm
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/metadata_scm.bbclass')
-rw-r--r--meta/classes/metadata_scm.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/metadata_scm.bbclass b/meta/classes/metadata_scm.bbclass
index 4f66011..b3c06dd 100644
--- a/meta/classes/metadata_scm.bbclass
+++ b/meta/classes/metadata_scm.bbclass
@@ -63,14 +63,14 @@ def base_get_metadata_svn_revision(path, d):
63 return revision 63 return revision
64 64
65def base_get_metadata_git_branch(path, d): 65def base_get_metadata_git_branch(path, d):
66 branch = os.popen('cd %s; git branch | grep "^* " | tr -d "* "' % path).read() 66 branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read()
67 67
68 if len(branch) != 0: 68 if len(branch) != 0:
69 return branch 69 return branch
70 return "<unknown>" 70 return "<unknown>"
71 71
72def base_get_metadata_git_revision(path, d): 72def base_get_metadata_git_revision(path, d):
73 rev = os.popen("cd %s; git log -n 1 --pretty=oneline --" % path).read().split(" ")[0] 73 rev = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path).read().split(" ")[0]
74 if len(rev) != 0: 74 if len(rev) != 0:
75 return rev 75 return rev
76 return "<unknown>" 76 return "<unknown>"