Message ID | 20230530224254.43797-1-m.belouarga@technologyandstrategy.com |
---|---|
State | New |
Headers | show |
Series | [master] fetch2: npmsw: Don't fetch dev dependencies when they are not demanded | expand |
Hello, This doesn't apply on master at all, can you rebase? Thanks! On 31/05/2023 00:42:54+0200, belouargamohamed@gmail.com wrote: > From: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> > > Dev dependencies should not be fetched only if it is specified in the > recipe. > > Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> > --- > lib/bb/fetch2/npmsw.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/bb/fetch2/npmsw.py b/lib/bb/fetch2/npmsw.py > index 359192a2..d89be10c 100644 > --- a/lib/bb/fetch2/npmsw.py > +++ b/lib/bb/fetch2/npmsw.py > @@ -49,6 +49,8 @@ def foreach_dependencies(shrinkwrap, callback=None, dev=False): > if package != "": > name = package.split('node_modules/')[-1] > package_infos = packages.get(package, {}) > + if dev == False and package_infos.get("dev", False): > + continue > callback(name, package_infos, package) > > class NpmShrinkWrap(FetchMethod): > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#14819): https://lists.openembedded.org/g/bitbake-devel/message/14819 > Mute This Topic: https://lists.openembedded.org/mt/99230772/3617179 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hey, Before applying this patch, on other patch should be accepted first: https://lists.openembedded.org/g/bitbake-devel/message/14815?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arecentpostdate%2Fsticky%2C%2Cbelouarga%2C20%2C2%2C0%2C99163598 Thanks
On 31/05/2023 11:59:35-0700, belouargamohamed@gmail.com wrote: > Hey, > > Before applying this patch, on other patch should be accepted first: > https://lists.openembedded.org/g/bitbake-devel/message/14815?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Arecentpostdate%2Fsticky%2C%2Cbelouarga%2C20%2C2%2C0%2C99163598 > This patch is marked for kirkstone so it has been ignored. Can you send a series that can be applied on master? > Thanks > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#14822): https://lists.openembedded.org/g/bitbake-devel/message/14822 > Mute This Topic: https://lists.openembedded.org/mt/99230772/3617179 > Group Owner: bitbake-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com] > -=-=-=-=-=-=-=-=-=-=-=- >
diff --git a/lib/bb/fetch2/npmsw.py b/lib/bb/fetch2/npmsw.py index 359192a2..d89be10c 100644 --- a/lib/bb/fetch2/npmsw.py +++ b/lib/bb/fetch2/npmsw.py @@ -49,6 +49,8 @@ def foreach_dependencies(shrinkwrap, callback=None, dev=False): if package != "": name = package.split('node_modules/')[-1] package_infos = packages.get(package, {}) + if dev == False and package_infos.get("dev", False): + continue callback(name, package_infos, package) class NpmShrinkWrap(FetchMethod):