On Thu, Jan 14, 2021 at 03:25:50PM +0100, Jean-Marie Lemetayer wrote:
> Hi Kamel,
>

Hi Jean-Marie,

> Thanks for your work. I should have fixed this a long time ago but I
> didn't have the time :(
>

Well its never too late !

> There is actually an open bug for this issue:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13901
> I think you can add the reference to your commit messages. And close
> it if merged.
>

OK, let's see if there are other comments then I shall resent with
proper commit messages.

> Please add some tests to ensure that:
>  1. devtool / recipetool do not create empty shrinkwrap file
>  2. the npmsw fetcher allows empty shrinkwrap file
>  3. the npm class allows empty shrinkwrap

Actually the fix is only to check wether or not the dependencies are
listed and if not we make sure the npm fetcher will not look for them.

So the empty shrinkwrap file is still created and allowed.

I've already done some test in both case with and w/o dependencies.

>
> See:
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=22dd46cc34629d0750177fddff2e1c178c854340
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=44b2ab8d5eb4fd1fc9a157fce37aaa7b7a7065e5
> https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f6728edb7e022b27223d28bd80ce40c2f2374a13
>
> Also Sandra has already worked on it, but it didn't get merged. I
> don't know why.
>
> See:
> https://lists.openembedded.org/g/bitbake-devel/topic/76459311#11643
> https://lists.openembedded.org/g/bitbake-devel/message/11648
>

I see, yet I went a bit further ensuring the npm recipes will not call
the npmsw fetcher when no dependencies are given.

Thanks for you comments.

Cheers,
Kamel

> BR
> Jean-Marie
>
> On Thu, Jan 14, 2021 at 8:13 AM Kamel Bouhara <[email protected]> 
> wrote:
> >
> > Hello all,
> >
> > This small patch series aims to fix the following build issue faced
> > with some npm packages:
> >
> > DEBUG: Executing python function do_fetch
> > DEBUG: Executing python function base_do_fetch
> > DEBUG: Python function base_do_fetch finished
> > DEBUG: Python function do_fetch finished
> > ERROR: Failure expanding variable TUNE_FEATURES_tune-armv7at-neon, 
> > expression was ${TUNE_FEATURES_tune-armv7at} neon which triggered exception 
> > RecursionError: maximum recursion depth exceeded while calling a Python 
> > object
> >
> > After struggling a lot, I figured out that this only happen for npm
> > packages not having dependencies listed in their shrinkwrap file (e.g. 
> > bcryptjs).
> >
> > Yet I still didn't got how is the json parsing impacting
> > the python context here ?
> >
> > Please feel free to comment.
> >
> > Thanks.
> >
> > Kamel Bouhara (2):
> >   npm.bbclass: make shrinkwrap file optional
> >   recipetool: create: only add npmsw url if required
> >
> >  meta/classes/npm.bbclass             | 31 +++++++++++++++++++++----------
> >  scripts/lib/recipetool/create_npm.py |  6 +++++-
> >  2 files changed, 26 insertions(+), 11 deletions(-)
> >
> > --
> > 2.11.0
> >
> >
> > 
> >

--
Kamel Bouhara, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146694): 
https://lists.openembedded.org/g/openembedded-core/message/146694
Mute This Topic: https://lists.openembedded.org/mt/79670723/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to