<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Yes, this patch fix this problem.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Thanks!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 5, 2016 at 3:13 PM, Paul Eggleton <span dir="ltr"><<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right, this is the problem Brendan was describing - I believe I sent a patch<br>
to fix this already:<br>
<br>
<a href="http://patchwork.openembedded.org/patch/121039/" rel="noreferrer" target="_blank">http://patchwork.openembedded.org/patch/121039/</a><br>
<br>
Cheers,<br>
Paul<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, 05 May 2016 09:51:53 Fabio Berton wrote:<br>
> Hi Paul,<br>
><br>
> When running:<br>
> recipetool create "npm://<a href="http://registry.npmjs.org" rel="noreferrer" target="_blank">registry.npmjs.org</a>;name=grunt-cli;version=1.1.0"<br>
><br>
> I get this error:<br>
><br>
> NOTE: Unpacking abbrev-1.0.7.tgz to<br>
> /tmp/recipetool-tXXZDi/npmpkg/node_modules/nopt/node_modules/abbrev/<br>
> Traceback (most recent call last):<br>
> File "sources/openembedded-core/scripts/recipetool", line 116, in <module><br>
> ret = main()<br>
> File "sources/openembedded-core/scripts/recipetool", line 107, in main<br>
> ret = args.func(args)<br>
> File "sources/openembedded-core/scripts/lib/recipetool/create.py", line<br>
> 561, in create_recipe<br>
> handler.process(srctree_use, classes, lines_before, lines_after,<br>
> handled, extravalues)<br>
> File "sources/openembedded-core/scripts/lib/recipetool/create_npm.py",<br>
> line 133, in process<br>
> license = self._handle_license(pdata)<br>
> File "sources/openembedded-core/scripts/lib/recipetool/create_npm.py",<br>
> line 44, in _handle_license<br>
> if 'license' in data:<br>
> TypeError: argument of type 'NoneType' is not iterable<br>
><br>
><br>
> On Thu, May 5, 2016 at 7:57 AM, Brendan Le Foll <<a href="mailto:brendan.le.foll@intel.com">brendan.le.foll@intel.com</a>><br>
><br>
> wrote:<br>
> > On Thu, May 05, 2016 at 07:10:43PM +1200, Paul Eggleton wrote:<br>
> > > Note also that devtool add / recipetool create are capable of creating<br>
> ><br>
> > pretty<br>
> ><br>
> > > complete recipes for npm packages where licenses are also correctly set<br>
> ><br>
> > per<br>
> ><br>
> > > package (so you get them in the image manifest). I'd strongly recommend<br>
> ><br>
> > using<br>
> ><br>
> > > it for this; if you have any issues please let me know.<br>
> ><br>
> > So actually it errors in this case because of a test package in the<br>
> > resolve module (this shows the issue quicker/easier) see:<br>
> > $ recipetool create "npm://<a href="http://registry.npmjs.org" rel="noreferrer" target="_blank">registry.npmjs.org</a>;name=resolve;version=1.1.7"<br>
> ><br>
> > There's a node_modules dir inside test/ it gets taken as if npm had<br>
> > resolved/download a dep when in fact it hasn't. Since node packages<br>
> > can and do ship their own deps with them sometimes, I think the only<br>
> > fix would be in npm_split_package_dirs to walk 1 level of the ${PN}<br>
> > dir only so that:<br>
> ><br>
> > ${PN}/node_modules -> taken<br>
> > ${PN}/tests/node_modules -> ignored<br>
> > ${PN}/node_modules/${PN}/node_modules -> taken<br>
> ><br>
> > Cheers,<br>
> > Brendan<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
<br>
Paul Eggleton<br>
Intel Open Source Technology Centre<br>
</div></div></blockquote></div><br></div>