[oe-commits] [openembedded-core] 30/31: recipetool: create: fix picking up false npm package directories

git at git.openembedded.org git at git.openembedded.org
Fri Apr 29 08:24:37 UTC 2016


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

commit e7cb3ce251d875baf4a4194f6f2cf90aa0c70781
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
AuthorDate: Thu Apr 28 01:06:18 2016 +1200

    recipetool: create: fix picking up false npm package directories
    
    It is possible for a Node.js module to have node_modules subdirectories
    that contain no package.json file (e.g. iotivity-node has such a
    directory). It appears these should simply be ignored, or else with the
    way the current code works we will get errors later.
    
    Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oe/package.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
index 2887689..252e32d 100644
--- a/meta/lib/oe/package.py
+++ b/meta/lib/oe/package.py
@@ -149,7 +149,7 @@ def npm_split_package_dirs(pkgdir):
                 if os.path.exists(pkgfile):
                     with open(pkgfile, 'r') as f:
                         data = json.loads(f.read())
-                packages[pkgname] = (relpth, data)
+                    packages[pkgname] = (relpth, data)
     # We want the main package for a module sorted *after* its subpackages
     # (so that it doesn't otherwise steal the files for the subpackage), so
     # this is a cheap way to do that whilst still having an otherwise

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


More information about the Openembedded-commits mailing list