summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-09-06 10:57:30 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-08 00:33:46 +0100
commit5ab68677140ad6ffab7fbdeee6caeb19f4d80cba (patch)
treea07ee0deff83658d51a20d7ce52c224ae1399e9b
parenteb53750ab705bf340a588f91e3da3a1c81234e9b (diff)
downloadpoky-5ab68677140ad6ffab7fbdeee6caeb19f4d80cba.tar.gz
bitbake: fetch2/npm: support subdir= parameter
"npmpkg" can be a default, but it should respect the subdir parameter as with other FetchMethods. This allows us to have more than one npm:// entry in SRC_URI without nasty hacks. Fix required in order to support [YOCTO #9537]. (Bitbake rev: e6a94d2091ec5d42f25102334a8492a731b8dec3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/npm.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index 9b2d9e1621..134bd35221 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -138,7 +138,12 @@ class Npm(FetchMethod):
138 workobj = json.load(datafile) 138 workobj = json.load(datafile)
139 dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname) 139 dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname)
140 140
141 self._unpackdep(ud, ud.pkgname, workobj, "%s/npmpkg" % destdir, dldir, d) 141 if 'subdir' in ud.parm:
142 unpackdir = '%s/%s' % (destdir, ud.parm.get('subdir'))
143 else:
144 unpackdir = '%s/npmpkg' % destdir
145
146 self._unpackdep(ud, ud.pkgname, workobj, unpackdir, dldir, d)
142 147
143 def _parse_view(self, output): 148 def _parse_view(self, output):
144 ''' 149 '''