diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:04 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 08:30:03 +0000 |
commit | 7c552996597faaee2fbee185b250c0ee30ea3b5f (patch) | |
tree | bb74186da3e2d4b03c33875a71fbe340ba09a0d7 /meta/lib/oe/patch.py | |
parent | 84ec50e587e7464b260b1b189659b93b6dab0ef6 (diff) | |
download | openembedded-core-contrib-7c552996597faaee2fbee185b250c0ee30ea3b5f.tar.gz |
meta: remove True option to getVar calls
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 456ee70f7d..95674b3706 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -281,8 +281,8 @@ class GitApplyTree(PatchTree): def __init__(self, dir, d): PatchTree.__init__(self, dir, d) - self.commituser = d.getVar('PATCH_GIT_USER_NAME', True) - self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True) + self.commituser = d.getVar('PATCH_GIT_USER_NAME') + self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL') @staticmethod def extractPatchHeader(patchfile): @@ -371,8 +371,8 @@ class GitApplyTree(PatchTree): @staticmethod def gitCommandUserOptions(cmd, commituser=None, commitemail=None, d=None): if d: - commituser = d.getVar('PATCH_GIT_USER_NAME', True) - commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True) + commituser = d.getVar('PATCH_GIT_USER_NAME') + commitemail = d.getVar('PATCH_GIT_USER_EMAIL') if commituser: cmd += ['-c', 'user.name="%s"' % commituser] if commitemail: @@ -551,7 +551,7 @@ class GitApplyTree(PatchTree): class QuiltTree(PatchSet): def _runcmd(self, args, run = True): - quiltrc = self.d.getVar('QUILTRCFILE', True) + quiltrc = self.d.getVar('QUILTRCFILE') if not run: return ["quilt"] + ["--quiltrc"] + [quiltrc] + args runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir) @@ -727,7 +727,7 @@ class UserResolver(Resolver): # Patch application failed patchcmd = self.patchset.Push(True, False, False) - t = self.patchset.d.getVar('T', True) + t = self.patchset.d.getVar('T') if not t: bb.msg.fatal("Build", "T not set") bb.utils.mkdirhier(t) @@ -792,7 +792,7 @@ def patch_path(url, fetch, workdir, expand=True): return local def src_patches(d, all=False, expand=True): - workdir = d.getVar('WORKDIR', True) + workdir = d.getVar('WORKDIR') fetch = bb.fetch2.Fetch([], d) patches = [] sources = [] @@ -839,13 +839,13 @@ def src_patches(d, all=False, expand=True): def should_apply(parm, d): if "mindate" in parm or "maxdate" in parm: - pn = d.getVar('PN', True) - srcdate = d.getVar('SRCDATE_%s' % pn, True) + pn = d.getVar('PN') + srcdate = d.getVar('SRCDATE_%s' % pn) if not srcdate: - srcdate = d.getVar('SRCDATE', True) + srcdate = d.getVar('SRCDATE') if srcdate == "now": - srcdate = d.getVar('DATE', True) + srcdate = d.getVar('DATE') if "maxdate" in parm and parm["maxdate"] < srcdate: return False, 'is outdated' @@ -855,22 +855,22 @@ def should_apply(parm, d): if "minrev" in parm: - srcrev = d.getVar('SRCREV', True) + srcrev = d.getVar('SRCREV') if srcrev and srcrev < parm["minrev"]: return False, 'applies to later revisions' if "maxrev" in parm: - srcrev = d.getVar('SRCREV', True) + srcrev = d.getVar('SRCREV') if srcrev and srcrev > parm["maxrev"]: return False, 'applies to earlier revisions' if "rev" in parm: - srcrev = d.getVar('SRCREV', True) + srcrev = d.getVar('SRCREV') if srcrev and parm["rev"] not in srcrev: return False, "doesn't apply to revision" if "notrev" in parm: - srcrev = d.getVar('SRCREV', True) + srcrev = d.getVar('SRCREV') if srcrev and parm["notrev"] in srcrev: return False, "doesn't apply to revision" |