From f6afa2c6c1d99729c5cbdf65b5674b64ad529fe7 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 10 Jun 2009 12:32:15 -0700 Subject: [PATCH] base.bbclass: make git fail silently in the metadata scm bits. Signed-off-by: Chris Larson --- classes/base.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/base.bbclass b/classes/base.bbclass index e622aeec51..6cafe9d665 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -885,7 +885,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().rstrip() + branch = os.popen('cd %s; git symbolic-ref HEAD 2>/dev/null' % path).read().rstrip() if len(branch) != 0: return branch.replace("refs/heads/", "") @@ -893,7 +893,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].rstrip() + rev = os.popen("cd %s; git show-ref HEAD 2>/dev/null" % path).read().split(" ")[0].rstrip() if len(rev) != 0: return rev return "" -- 2.39.5