From 096d818cca0ef3c32b1e1de20ec8430d1e7fe195 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Wed, 7 Jun 2017 23:30:32 -0400 Subject: MRW: avoid recursive install of hwmon configs Fix an issue where any hwmon conf file under WORKDIR is installed in the image. If hwmon-config-mrw is run multiple times, subsequent bakes will install conf files under image, packages-split, etc into the image. Install MRW generated hwmon configs in a directory under WORKDIR. Point the config file search algorithm at this directory, rather than WORKDIR to avoid finding configuration files installed into image, packages-split, etc...from previous bakes. Change-Id: I569092af4033935cc6113e101c8ec7e37b5849c9 Signed-off-by: Brad Bishop --- .../common/recipes-phosphor/sensors/phosphor-hwmon-config-mrw.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 e667a7a9c..7e016b51d 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 @@ -11,7 +11,7 @@ do_compile_append() { ${STAGING_BINDIR_NATIVE}/perl-native/perl \ ${STAGING_BINDIR_NATIVE}/hwmon.pl \ -x ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \ - -d ${WORKDIR} + -d ${WORKDIR}/mrw-config-files } def find_conf_files(dir): @@ -30,12 +30,15 @@ def find_conf_files(dir): python install_conf_files() { from shutil import copy - files = find_conf_files(d.getVar("WORKDIR", True)) + conf_file_dir = os.path.join( + d.getVar("WORKDIR", True), + 'mrw-config-files') + files = find_conf_files(conf_file_dir) install_dir = os.path.join(d.getVar("D", True), "etc", "default", "obmc", "hwmon") - dir_len = len(d.getVar("WORKDIR", True)) + dir_len = len(conf_file_dir) for f in files: dest = os.path.join(install_dir, f[dir_len + 1:]) -- cgit v1.2.1