Skip to contentSkip to conversation

fetch2: npmsw: Don't fetch dev dependencies when they are not demanded

PATCH In review [email protected] 2 participants 4 messages May 30, 2023 – Jun 1, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2: npmsw: Don't fetch dev dependencies when they are not demanded

From: BELOUARGA Mohamed <[email protected]>

Dev dependencies should not be fetched only if it is specified in the recipe.

---
 lib/bb/fetch2/npmsw.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/fetch2/npmsw.py +2 -0
index 359192a2..d89be10c 100644
@@ -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):
Signature · 1 line
2.25.1
#1 lore raw

Hello,

This doesn't apply on master at all, can you rebase?

Thanks!

Quoted 36 lines · On 31/05/2023 00:42:54+0200, [email protected] wrote:

From: BELOUARGA Mohamed <[email protected]>

Dev dependencies should not be fetched only if it is specified in the recipe.

---
 lib/bb/fetch2/npmsw.py | 2 ++
 1 file changed, 2 insertions(+)
lib/bb/fetch2/npmsw.py +2 -0
index 359192a2..d89be10c 100644
@@ -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):
Signature · 11 lines
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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw
Quoted 5 lines · On 31/05/2023 11:59:35-0700, [email protected] 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?

Quoted 11 lines

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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com