mapper: Fix mapper environment generation bug
Fix a logic issue that results in an emitted mapper environment file
with interfaces like: rg.openbmc and yz.openbmc_project
Change-Id: I5ad30e45da08123b7611390855c04237ff5b60de
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/classes/phosphor-mapper.bbclass b/classes/phosphor-mapper.bbclass
index 26f369b..71d26ec 100644
--- a/classes/phosphor-mapper.bbclass
+++ b/classes/phosphor-mapper.bbclass
@@ -34,7 +34,7 @@
os.makedirs(parent)
path = os.path.join(
parent,
- '-'.join(p[1:].split(os.sep)))
+ '-'.join(p.split(os.sep)))
with open(path, 'w+') as fd:
pass
diff --git a/common/recipes-phosphor/dbus/phosphor-mapper.bb b/common/recipes-phosphor/dbus/phosphor-mapper.bb
index a891b48..6797af6 100644
--- a/common/recipes-phosphor/dbus/phosphor-mapper.bb
+++ b/common/recipes-phosphor/dbus/phosphor-mapper.bb
@@ -52,7 +52,7 @@
d.getVar('namespace_dir', True)
paths = []
for p in os.listdir(path):
- paths.append(os.sep + os.sep.join(p.split('-')))
+ paths.append(os.sep.join(p.split('-')))
path = d.getVar('STAGING_DIR_NATIVE', True) + \
d.getVar('interface_dir', True)