summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2019-01-13 11:18:24 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-12 22:01:10 +0000
commit2fcbc079e2792030606117e21f4e70e111d4fd1a (patch)
treefc38ed189d859673bcd68c7bead3cce5651fd1e4 /bitbake
parentf2c0bba7e7ad2bab0a1c38722eb44a40cf2d2aa3 (diff)
downloadpoky-2fcbc079e2792030606117e21f4e70e111d4fd1a.tar.gz
bitbake: bitbake: remove True option to getVar calls
getVar() has been defaulting to expanding by default for a long time (2016), thus remove the True option from getVar() calls with a regex search and replace. Search & replace made using the following command: sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) (Bitbake rev: 3bba0dbd524cf72176a765957adff544ae5c255a) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/git.py2
-rw-r--r--bitbake/lib/bb/tests/fetch.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index c3c089233b..1a8ebe3da8 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -199,7 +199,7 @@ class Git(FetchMethod):
199 depth_default = 1 199 depth_default = 1
200 ud.shallow_depths = collections.defaultdict(lambda: depth_default) 200 ud.shallow_depths = collections.defaultdict(lambda: depth_default)
201 201
202 revs_default = d.getVar("BB_GIT_SHALLOW_REVS", True) 202 revs_default = d.getVar("BB_GIT_SHALLOW_REVS")
203 ud.shallow_revs = [] 203 ud.shallow_revs = []
204 ud.branches = {} 204 ud.branches = {}
205 for pos, name in enumerate(ud.names): 205 for pos, name in enumerate(ud.names):
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py
index 522d2024fa..257326277a 100644
--- a/bitbake/lib/bb/tests/fetch.py
+++ b/bitbake/lib/bb/tests/fetch.py
@@ -1338,7 +1338,7 @@ class GitShallowTest(FetcherTest):
1338 1338
1339 def fetch(self, uri=None): 1339 def fetch(self, uri=None):
1340 if uri is None: 1340 if uri is None:
1341 uris = self.d.getVar('SRC_URI', True).split() 1341 uris = self.d.getVar('SRC_URI').split()
1342 uri = uris[0] 1342 uri = uris[0]
1343 d = self.d 1343 d = self.d
1344 else: 1344 else:
@@ -1397,7 +1397,7 @@ class GitShallowTest(FetcherTest):
1397 1397
1398 srcrev = self.git('rev-parse HEAD', cwd=self.srcdir).strip() 1398 srcrev = self.git('rev-parse HEAD', cwd=self.srcdir).strip()
1399 self.d.setVar('SRCREV', srcrev) 1399 self.d.setVar('SRCREV', srcrev)
1400 uri = self.d.getVar('SRC_URI', True).split()[0] 1400 uri = self.d.getVar('SRC_URI').split()[0]
1401 uri = '%s;nobranch=1;bare=1' % uri 1401 uri = '%s;nobranch=1;bare=1' % uri
1402 1402
1403 self.fetch_shallow(uri) 1403 self.fetch_shallow(uri)
@@ -1576,7 +1576,7 @@ class GitShallowTest(FetcherTest):
1576 self.add_empty_file('f') 1576 self.add_empty_file('f')
1577 self.assertRevCount(7, cwd=self.srcdir) 1577 self.assertRevCount(7, cwd=self.srcdir)
1578 1578
1579 uri = self.d.getVar('SRC_URI', True).split()[0] 1579 uri = self.d.getVar('SRC_URI').split()[0]
1580 uri = '%s;branch=master,a_branch;name=master,a_branch' % uri 1580 uri = '%s;branch=master,a_branch;name=master,a_branch' % uri
1581 1581
1582 self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0') 1582 self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
@@ -1602,7 +1602,7 @@ class GitShallowTest(FetcherTest):
1602 self.add_empty_file('f') 1602 self.add_empty_file('f')
1603 self.assertRevCount(7, cwd=self.srcdir) 1603 self.assertRevCount(7, cwd=self.srcdir)
1604 1604
1605 uri = self.d.getVar('SRC_URI', True).split()[0] 1605 uri = self.d.getVar('SRC_URI').split()[0]
1606 uri = '%s;branch=master,a_branch;name=master,a_branch' % uri 1606 uri = '%s;branch=master,a_branch;name=master,a_branch' % uri
1607 1607
1608 self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0') 1608 self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')