summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorBELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>2023-07-21 01:41:21 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-08-04 11:48:26 +0100
commit1f92db2d2cadf623f8799d7c58495a6158d3d405 (patch)
treec2da957200c5e1012c75e0bbe73703880819e007 /bitbake
parentb63831af2b0d1a617280a1a9ca66219464f61af2 (diff)
downloadpoky-1f92db2d2cadf623f8799d7c58495a6158d3d405.tar.gz
bitbake: bitbake: fetch2/npmsw: Check if there are dependencies before trying to fetch them
When there are no dependencies, _foreach_proxy_method does not verify that there are dependencies to fetch before fetching them. (Bitbake rev: 48a102e49448656ef25fb689af7b0971fde523e3) Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/npmsw.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch2/npmsw.py b/bitbake/lib/bb/fetch2/npmsw.py
index 971ccc9050..4ff2c8ffc3 100644
--- a/bitbake/lib/bb/fetch2/npmsw.py
+++ b/bitbake/lib/bb/fetch2/npmsw.py
@@ -225,13 +225,15 @@ class NpmShrinkWrap(FetchMethod):
225 @staticmethod 225 @staticmethod
226 def _foreach_proxy_method(ud, handle): 226 def _foreach_proxy_method(ud, handle):
227 returns = [] 227 returns = []
228 for proxy_url in ud.proxy.urls: 228 #Check if there are dependencies before try to fetch them
229 proxy_ud = ud.proxy.ud[proxy_url] 229 if len(ud.deps) > 0:
230 proxy_d = ud.proxy.d 230 for proxy_url in ud.proxy.urls:
231 proxy_ud.setup_localpath(proxy_d) 231 proxy_ud = ud.proxy.ud[proxy_url]
232 lf = lockfile(proxy_ud.lockfile) 232 proxy_d = ud.proxy.d
233 returns.append(handle(proxy_ud.method, proxy_ud, proxy_d)) 233 proxy_ud.setup_localpath(proxy_d)
234 unlockfile(lf) 234 lf = lockfile(proxy_ud.lockfile)
235 returns.append(handle(proxy_ud.method, proxy_ud, proxy_d))
236 unlockfile(lf)
235 return returns 237 return returns
236 238
237 def verify_donestamp(self, ud, d): 239 def verify_donestamp(self, ud, d):