diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-03 10:59:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-05 10:33:18 -0800 |
commit | 41bc192c0b5795561b239872008c91a867732219 (patch) | |
tree | a21feb51bde721ba553296676ce4b5ea2662bf37 /meta/lib | |
parent | 3b57de68e70e77dbc03c0616a83a29a2e99e40b4 (diff) | |
download | openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.gz openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.bz2 openembedded-core-41bc192c0b5795561b239872008c91a867732219.tar.xz openembedded-core-41bc192c0b5795561b239872008c91a867732219.zip |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/patch.py | 4 | ||||
-rw-r--r-- | meta/lib/oe/path.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index a5b31b8f8..17b7e1f27 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 8eaa3c5da..683b09701 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: |