From 460ca24018fdc48d967480a4fa54f291ea7a6eaf Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Fri, 10 Sep 2021 22:32:22 -0500 Subject: meta-phosphor: os-release: add indirect for root directory The `run_git` in phosphor's os-release.bbappend assumes that the git repository is in `${COREBASE}`, which is the location of the `meta/` subdirectory. This is true when building exclusively the `openbmc` tree but may not be the case when external users attempt to use the `openbmc` tree as a git-submodule. Create an indirection (`OS_RELEASE_ROOTPATH`) which defaults to `COREBASE`, but allows an override for those other use-cases. Signed-off-by: Patrick Williams Change-Id: I4e0171e065379c5030a36ea5be774b5db78bfe34 --- meta-phosphor/recipes-core/os-release/os-release.bbappend | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'meta-phosphor/recipes-core/os-release/os-release.bbappend') diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend index de9a02f27..7e90ab3fb 100644 --- a/meta-phosphor/recipes-core/os-release/os-release.bbappend +++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend @@ -5,9 +5,11 @@ # and pasting into another recipe ensure it is understood # what that means! +OS_RELEASE_ROOTPATH ?= "${COREBASE}" + def run_git(d, cmd): try: - oeroot = d.getVar('COREBASE', True) + oeroot = d.getVar('OS_RELEASE_ROOTPATH', True) return bb.process.run(("export PSEUDO_DISABLED=1; " + "git --work-tree %s --git-dir %s/.git %s") % (oeroot, oeroot, cmd))[0].strip('\n') -- cgit v1.2.3