summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2017-02-28 15:25:39 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-03-01 19:47:12 +0000
commit98e61e4542a2cdc9e9dd32a20e6e5186a87d82a5 (patch)
tree4fda3eb4fcf79142541657c5d4a33e58d3b7b826
parent04c3ef09c2c9b2b594937da19b02d7dd08d75c94 (diff)
downloadtalos-openbmc-98e61e4542a2cdc9e9dd32a20e6e5186a87d82a5.tar.gz
talos-openbmc-98e61e4542a2cdc9e9dd32a20e6e5186a87d82a5.zip
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 <patrick@stwcx.xyz>
-rw-r--r--meta-phosphor/common/recipes-core/os-release/os-release.bbappend3
1 files changed, 2 insertions, 1 deletions
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
OpenPOWER on IntegriCloud