[oe-commits] [bitbake] 03/18: fetch2/npm: support subdir= parameter

git at git.openembedded.org git at git.openembedded.org
Tue Sep 6 09:37:38 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit e6a94d2091ec5d42f25102334a8492a731b8dec3
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Tue Sep 6 10:57:30 2016 +1200

    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].
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/npm.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/npm.py b/lib/bb/fetch2/npm.py
index 9b2d9e1..134bd35 100644
--- a/lib/bb/fetch2/npm.py
+++ b/lib/bb/fetch2/npm.py
@@ -138,7 +138,12 @@ class Npm(FetchMethod):
             workobj = json.load(datafile)
         dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname)
 
-        self._unpackdep(ud, ud.pkgname, workobj,  "%s/npmpkg" % destdir, dldir, d)
+        if 'subdir' in ud.parm:
+            unpackdir = '%s/%s' % (destdir, ud.parm.get('subdir'))
+        else:
+            unpackdir = '%s/npmpkg' % destdir
+
+        self._unpackdep(ud, ud.pkgname, workobj, unpackdir, dldir, d)
 
     def _parse_view(self, output):
         '''

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list