From 98e61e4542a2cdc9e9dd32a20e6e5186a87d82a5 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Tue, 28 Feb 2017 15:25:39 -0600 Subject: os-release: ensure 'dirty' really means dirty. When using --git-dir, git no longer automatically determines the working tree and thus always assumes the tree is dirty unless the --work-tree option is also passed. Fixes openbmc/openbmc#820. Change-Id: I3af6941e0562bf665290e57c2b7a80459385fefa Signed-off-by: Patrick Williams --- meta-phosphor/common/recipes-core/os-release/os-release.bbappend | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta-phosphor/common/recipes-core') diff --git a/meta-phosphor/common/recipes-core/os-release/os-release.bbappend b/meta-phosphor/common/recipes-core/os-release/os-release.bbappend index d91823dd7..1ac195fbd 100644 --- a/meta-phosphor/common/recipes-core/os-release/os-release.bbappend +++ b/meta-phosphor/common/recipes-core/os-release/os-release.bbappend @@ -1,7 +1,8 @@ def run_git(d, cmd): try: oeroot = d.getVar('COREBASE', True) - return bb.process.run("git --git-dir %s/.git %s" %(oeroot, cmd))[0].strip('\n') + return bb.process.run("git --work-tree %s --git-dir %s/.git %s" + % (oeroot, oeroot, cmd))[0].strip('\n') except: pass -- cgit v1.2.3