summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-12-14 21:13:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:23 +0000
commitc4e2c59088765d1f1de7ec57cde91980f887c2ff (patch)
treea2fda8ac5916fb59a711e9220c2177008cca9347 /meta/lib/oe/patch.py
parentd5e67725ac11e3296cad104470931ffa16824b90 (diff)
downloadpoky-c4e2c59088765d1f1de7ec57cde91980f887c2ff.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\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py30
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):
281 281
282 def __init__(self, dir, d): 282 def __init__(self, dir, d):
283 PatchTree.__init__(self, dir, d) 283 PatchTree.__init__(self, dir, d)
284 self.commituser = d.getVar('PATCH_GIT_USER_NAME', True) 284 self.commituser = d.getVar('PATCH_GIT_USER_NAME')
285 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True) 285 self.commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
286 286
287 @staticmethod 287 @staticmethod
288 def extractPatchHeader(patchfile): 288 def extractPatchHeader(patchfile):
@@ -371,8 +371,8 @@ class GitApplyTree(PatchTree):
371 @staticmethod 371 @staticmethod
372 def gitCommandUserOptions(cmd, commituser=None, commitemail=None, d=None): 372 def gitCommandUserOptions(cmd, commituser=None, commitemail=None, d=None):
373 if d: 373 if d:
374 commituser = d.getVar('PATCH_GIT_USER_NAME', True) 374 commituser = d.getVar('PATCH_GIT_USER_NAME')
375 commitemail = d.getVar('PATCH_GIT_USER_EMAIL', True) 375 commitemail = d.getVar('PATCH_GIT_USER_EMAIL')
376 if commituser: 376 if commituser:
377 cmd += ['-c', 'user.name="%s"' % commituser] 377 cmd += ['-c', 'user.name="%s"' % commituser]
378 if commitemail: 378 if commitemail:
@@ -551,7 +551,7 @@ class GitApplyTree(PatchTree):
551 551
552class QuiltTree(PatchSet): 552class QuiltTree(PatchSet):
553 def _runcmd(self, args, run = True): 553 def _runcmd(self, args, run = True):
554 quiltrc = self.d.getVar('QUILTRCFILE', True) 554 quiltrc = self.d.getVar('QUILTRCFILE')
555 if not run: 555 if not run:
556 return ["quilt"] + ["--quiltrc"] + [quiltrc] + args 556 return ["quilt"] + ["--quiltrc"] + [quiltrc] + args
557 runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir) 557 runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir)
@@ -727,7 +727,7 @@ class UserResolver(Resolver):
727 # Patch application failed 727 # Patch application failed
728 patchcmd = self.patchset.Push(True, False, False) 728 patchcmd = self.patchset.Push(True, False, False)
729 729
730 t = self.patchset.d.getVar('T', True) 730 t = self.patchset.d.getVar('T')
731 if not t: 731 if not t:
732 bb.msg.fatal("Build", "T not set") 732 bb.msg.fatal("Build", "T not set")
733 bb.utils.mkdirhier(t) 733 bb.utils.mkdirhier(t)
@@ -792,7 +792,7 @@ def patch_path(url, fetch, workdir, expand=True):
792 return local 792 return local
793 793
794def src_patches(d, all=False, expand=True): 794def src_patches(d, all=False, expand=True):
795 workdir = d.getVar('WORKDIR', True) 795 workdir = d.getVar('WORKDIR')
796 fetch = bb.fetch2.Fetch([], d) 796 fetch = bb.fetch2.Fetch([], d)
797 patches = [] 797 patches = []
798 sources = [] 798 sources = []
@@ -839,13 +839,13 @@ def src_patches(d, all=False, expand=True):
839 839
840def should_apply(parm, d): 840def should_apply(parm, d):
841 if "mindate" in parm or "maxdate" in parm: 841 if "mindate" in parm or "maxdate" in parm:
842 pn = d.getVar('PN', True) 842 pn = d.getVar('PN')
843 srcdate = d.getVar('SRCDATE_%s' % pn, True) 843 srcdate = d.getVar('SRCDATE_%s' % pn)
844 if not srcdate: 844 if not srcdate:
845 srcdate = d.getVar('SRCDATE', True) 845 srcdate = d.getVar('SRCDATE')
846 846
847 if srcdate == "now": 847 if srcdate == "now":
848 srcdate = d.getVar('DATE', True) 848 srcdate = d.getVar('DATE')
849 849
850 if "maxdate" in parm and parm["maxdate"] < srcdate: 850 if "maxdate" in parm and parm["maxdate"] < srcdate:
851 return False, 'is outdated' 851 return False, 'is outdated'
@@ -855,22 +855,22 @@ def should_apply(parm, d):
855 855
856 856
857 if "minrev" in parm: 857 if "minrev" in parm:
858 srcrev = d.getVar('SRCREV', True) 858 srcrev = d.getVar('SRCREV')
859 if srcrev and srcrev < parm["minrev"]: 859 if srcrev and srcrev < parm["minrev"]:
860 return False, 'applies to later revisions' 860 return False, 'applies to later revisions'
861 861
862 if "maxrev" in parm: 862 if "maxrev" in parm:
863 srcrev = d.getVar('SRCREV', True) 863 srcrev = d.getVar('SRCREV')
864 if srcrev and srcrev > parm["maxrev"]: 864 if srcrev and srcrev > parm["maxrev"]:
865 return False, 'applies to earlier revisions' 865 return False, 'applies to earlier revisions'
866 866
867 if "rev" in parm: 867 if "rev" in parm:
868 srcrev = d.getVar('SRCREV', True) 868 srcrev = d.getVar('SRCREV')
869 if srcrev and parm["rev"] not in srcrev: 869 if srcrev and parm["rev"] not in srcrev:
870 return False, "doesn't apply to revision" 870 return False, "doesn't apply to revision"
871 871
872 if "notrev" in parm: 872 if "notrev" in parm:
873 srcrev = d.getVar('SRCREV', True) 873 srcrev = d.getVar('SRCREV')
874 if srcrev and parm["notrev"] in srcrev: 874 if srcrev and parm["notrev"] in srcrev:
875 return False, "doesn't apply to revision" 875 return False, "doesn't apply to revision"
876 876