diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-04-28 01:06:18 +1200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-29 19:35:56 +0100 |
commit | e89f4e531f9b837d4296f3292f1a4d8f8de9530a (patch) | |
tree | 6b70c67fb87e773b877eaab96ce8e2d839b9f1fa /meta/lib | |
parent | 7925e8942f654a3d084aa25eee439497619f9f01 (diff) | |
download | poky-e89f4e531f9b837d4296f3292f1a4d8f8de9530a.tar.gz |
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.
(From OE-Core rev: 8c522f1f536270e195c8c73f5c72801495e7b33b)
(From OE-Core rev: 8da9185a1c68c8274269841d0867d7d4abf426f0)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/package.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 2887689541..252e32d1df 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
@@ -149,7 +149,7 @@ def npm_split_package_dirs(pkgdir): | |||
149 | if os.path.exists(pkgfile): | 149 | if os.path.exists(pkgfile): |
150 | with open(pkgfile, 'r') as f: | 150 | with open(pkgfile, 'r') as f: |
151 | data = json.loads(f.read()) | 151 | data = json.loads(f.read()) |
152 | packages[pkgname] = (relpth, data) | 152 | packages[pkgname] = (relpth, data) |
153 | # We want the main package for a module sorted *after* its subpackages | 153 | # We want the main package for a module sorted *after* its subpackages |
154 | # (so that it doesn't otherwise steal the files for the subpackage), so | 154 | # (so that it doesn't otherwise steal the files for the subpackage), so |
155 | # this is a cheap way to do that whilst still having an otherwise | 155 | # this is a cheap way to do that whilst still having an otherwise |