From 06f2f8ce0a3093973ca54b48f542f8485b666079 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 3 Mar 2012 10:59:25 +0000 Subject: meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True) Using "1" with getVar is bad coding style and "True" is preferred. This patch is a sed over the meta directory of the form: sed \ -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \ -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \ -i `grep -ril getVar *` Signed-off-by: Richard Purdie --- meta/lib/oe/patch.py | 4 ++-- meta/lib/oe/path.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index a5b31b8f8d..17b7e1f27d 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py @@ -220,7 +220,7 @@ class GitApplyTree(PatchTree): class QuiltTree(PatchSet): def _runcmd(self, args, run = True): - quiltrc = self.d.getVar('QUILTRCFILE', 1) + quiltrc = self.d.getVar('QUILTRCFILE', True) if not run: return ["quilt"] + ["--quiltrc"] + [quiltrc] + args runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir) @@ -398,7 +398,7 @@ class UserResolver(Resolver): # Patch application failed patchcmd = self.patchset.Push(True, False, False) - t = self.patchset.d.getVar('T', 1) + t = self.patchset.d.getVar('T', True) if not t: bb.msg.fatal("Build", "T not set") bb.utils.mkdirhier(t) diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py index 8eaa3c5da4..683b09701c 100644 --- a/meta/lib/oe/path.py +++ b/meta/lib/oe/path.py @@ -42,7 +42,7 @@ def relative(src, dest): def format_display(path, metadata): """ Prepare a path for display to the user. """ - rel = relative(metadata.getVar("TOPDIR", 1), path) + rel = relative(metadata.getVar("TOPDIR", True), path) if len(rel) > len(path): return path else: -- cgit v1.2.3-54-g00ecf