summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-03-29 12:34:40 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-03-29 21:31:56 +0000
commit6fb9ddb3c4bab1a38453d06d3a3eefd890a49ac8 (patch)
tree2aa489971f5b68235f29ffbbbc58f7491e727fd3
parente6870323bed60378abc8f8ae4a8ba2f5d1e7c790 (diff)
downloadtalos-openbmc-6fb9ddb3c4bab1a38453d06d3a3eefd890a49ac8.tar.gz
talos-openbmc-6fb9ddb3c4bab1a38453d06d3a3eefd890a49ac8.zip
phosphor-hwmon-config-mrw: avoid relative path in recipe
This path can be different on different build systems. Instead, use WORKDIR as the path. Change-Id: I11f91087c62174e1f700c7c7d7d4618a4c0b47df Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r--meta-phosphor/classes/mrw-rev.bbclass2
-rw-r--r--meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb14
2 files changed, 10 insertions, 6 deletions
diff --git a/meta-phosphor/classes/mrw-rev.bbclass b/meta-phosphor/classes/mrw-rev.bbclass
index 7cf8e7d61..9a49bd462 100644
--- a/meta-phosphor/classes/mrw-rev.bbclass
+++ b/meta-phosphor/classes/mrw-rev.bbclass
@@ -2,4 +2,4 @@ MRW_API_SRC_URI ?= "git://github.com/open-power/serverwiz.git;subpath=scripts"
MRW_API_SRCREV ?= "60c8e10cbb11768cd1ba394b35cb1d6627efec42"
MRW_TOOLS_SRC_URI ?= "git://github.com/openbmc/phosphor-mrw-tools"
-MRW_TOOLS_SRCREV ?= "902c85375105db9f73353f510b4a6e2651d65c9e"
+MRW_TOOLS_SRCREV ?= "9142da4b410e6c34aca3ef8a8e84b13d39a9c00d"
diff --git a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
index d72d5036b..e667a7a9c 100644
--- a/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
+++ b/meta-phosphor/common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb
@@ -10,16 +10,17 @@ DEPENDS += "mrw-perl-tools-native mrw-native"
do_compile_append() {
${STAGING_BINDIR_NATIVE}/perl-native/perl \
${STAGING_BINDIR_NATIVE}/hwmon.pl \
- -x ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml
+ -x ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+ -d ${WORKDIR}
}
-def find_conf_files():
+def find_conf_files(dir):
from fnmatch import fnmatch
myfiles = []
#These conf files generated by hwmon.pl are in
#subdirectories which we need to preserve the path to.
- for root, dirs, files in os.walk("./"):
+ for root, dirs, files in os.walk(dir):
for name in files:
if fnmatch(name, "*.conf"):
myfiles.append(os.path.join(root, name))
@@ -29,12 +30,15 @@ def find_conf_files():
python install_conf_files() {
from shutil import copy
- files = find_conf_files()
+ files = find_conf_files(d.getVar("WORKDIR", True))
install_dir = os.path.join(d.getVar("D", True),
"etc", "default", "obmc", "hwmon")
+
+ dir_len = len(d.getVar("WORKDIR", True))
+
for f in files:
- dest = os.path.join(install_dir, f)
+ dest = os.path.join(install_dir, f[dir_len + 1:])
parent = os.path.dirname(dest)
if not os.path.exists(parent):
os.makedirs(parent)
OpenPOWER on IntegriCloud