summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorBrendan Le Foll <brendan.le.foll@intel.com>2016-04-12 10:58:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-14 10:58:33 +0100
commit69e20cade69af6b7563581a6f03e95667ab09c43 (patch)
tree1bfb85166c5756b92fe94ddcd19cc73be66f767c /meta/lib
parentc3c55478f5d346c65bd6f1e0a188da49e5a1369e (diff)
downloadpoky-69e20cade69af6b7563581a6f03e95667ab09c43.tar.gz
npm.bbclass: Stop packagenames containing underscores from being generated
Package names cannot contain underscores yet some npm modules use them as part of the name, replace them with hyphens in the package name. (From OE-Core rev: fea932c79c8201e3e7649f4443874ea540e33461) Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/package.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index dea443d658..2887689541 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -143,7 +143,7 @@ def npm_split_package_dirs(pkgdir):
143 if pathitem == 'node_modules': 143 if pathitem == 'node_modules':
144 continue 144 continue
145 pkgitems.append(pathitem) 145 pkgitems.append(pathitem)
146 pkgname = '-'.join(pkgitems) 146 pkgname = '-'.join(pkgitems).replace('_', '-')
147 pkgfile = os.path.join(root, dn, 'package.json') 147 pkgfile = os.path.join(root, dn, 'package.json')
148 data = None 148 data = None
149 if os.path.exists(pkgfile): 149 if os.path.exists(pkgfile):