diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2021-09-11 06:32:22 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-09-13 20:25:51 +0300 |
commit | 460ca24018fdc48d967480a4fa54f291ea7a6eaf (patch) | |
tree | 3691a5c7b2edfbc046065c319d4f49b487f8dda1 /meta-phosphor/recipes-core/os-release/os-release.bbappend | |
parent | 9a6d1185cfd782e326292705330e69566e3bfa7d (diff) | |
download | openbmc-460ca24018fdc48d967480a4fa54f291ea7a6eaf.tar.xz |
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 <patrick@stwcx.xyz>
Change-Id: I4e0171e065379c5030a36ea5be774b5db78bfe34
Diffstat (limited to 'meta-phosphor/recipes-core/os-release/os-release.bbappend')
-rw-r--r-- | meta-phosphor/recipes-core/os-release/os-release.bbappend | 4 |
1 files changed, 3 insertions, 1 deletions
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') |