summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBöszörményi Zoltán <zboszor@pr.hu>2018-02-04 09:36:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-14 15:26:03 +0000
commitbb3a634226c68b235d0110b9955d0aae7dde994a (patch)
treed70737f4da60dc845ae7f392807b09a51917a780
parent3e76b1b50c18e5e1d87d19df49fc5fb598cb84f9 (diff)
downloadpoky-bb3a634226c68b235d0110b9955d0aae7dde994a.tar.gz
bitbake: fetch2/npm.py: Fix inverted condition to prevent infinite loop
At least the cli-color node module has dependencies that have cyclic dependency among themselves. npm.py is prepared to deal with such a case but the condition is handled only for downloading or not a dependency again, but then it goes checking the its dependency which causes an infinite loop in _getdependencies(). Make this function simply return when a dependency is already downloaded and only download and check its dependencies when not. (Bitbake rev: 545540420112992e53f4a83104af10452df168d0) Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/fetch2/npm.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index b5f148ca03..730c346a93 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -195,9 +195,11 @@ class Npm(FetchMethod):
195 outputurl = pdata['dist']['tarball'] 195 outputurl = pdata['dist']['tarball']
196 data[pkg] = {} 196 data[pkg] = {}
197 data[pkg]['tgz'] = os.path.basename(outputurl) 197 data[pkg]['tgz'] = os.path.basename(outputurl)
198 if not outputurl in fetchedlist: 198 if outputurl in fetchedlist:
199 self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False) 199 return
200 fetchedlist.append(outputurl) 200
201 self._runwget(ud, d, "%s --directory-prefix=%s %s" % (self.basecmd, ud.prefixdir, outputurl), False)
202 fetchedlist.append(outputurl)
201 203
202 dependencies = pdata.get('dependencies', {}) 204 dependencies = pdata.get('dependencies', {})
203 optionalDependencies = pdata.get('optionalDependencies', {}) 205 optionalDependencies = pdata.get('optionalDependencies', {})