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>
This commit is contained in:
André Draszik 2019-01-13 11:18:24 +00:00 committed by Richard Purdie
parent f2c0bba7e7
commit 2fcbc079e2
2 changed files with 5 additions and 5 deletions

View File

@ -199,7 +199,7 @@ class Git(FetchMethod):
depth_default = 1
ud.shallow_depths = collections.defaultdict(lambda: depth_default)
revs_default = d.getVar("BB_GIT_SHALLOW_REVS", True)
revs_default = d.getVar("BB_GIT_SHALLOW_REVS")
ud.shallow_revs = []
ud.branches = {}
for pos, name in enumerate(ud.names):

View File

@ -1338,7 +1338,7 @@ class GitShallowTest(FetcherTest):
def fetch(self, uri=None):
if uri is None:
uris = self.d.getVar('SRC_URI', True).split()
uris = self.d.getVar('SRC_URI').split()
uri = uris[0]
d = self.d
else:
@ -1397,7 +1397,7 @@ class GitShallowTest(FetcherTest):
srcrev = self.git('rev-parse HEAD', cwd=self.srcdir).strip()
self.d.setVar('SRCREV', srcrev)
uri = self.d.getVar('SRC_URI', True).split()[0]
uri = self.d.getVar('SRC_URI').split()[0]
uri = '%s;nobranch=1;bare=1' % uri
self.fetch_shallow(uri)
@ -1576,7 +1576,7 @@ class GitShallowTest(FetcherTest):
self.add_empty_file('f')
self.assertRevCount(7, cwd=self.srcdir)
uri = self.d.getVar('SRC_URI', True).split()[0]
uri = self.d.getVar('SRC_URI').split()[0]
uri = '%s;branch=master,a_branch;name=master,a_branch' % uri
self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')
@ -1602,7 +1602,7 @@ class GitShallowTest(FetcherTest):
self.add_empty_file('f')
self.assertRevCount(7, cwd=self.srcdir)
uri = self.d.getVar('SRC_URI', True).split()[0]
uri = self.d.getVar('SRC_URI').split()[0]
uri = '%s;branch=master,a_branch;name=master,a_branch' % uri
self.d.setVar('BB_GIT_SHALLOW_DEPTH', '0')