diff options
author | Joshua Lock <joshua.g.lock@intel.com> | 2016-12-14 21:13:05 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-16 10:23:23 +0000 |
commit | c0f2890c01882e9ea14e781c044f3a84f75bd0fc (patch) | |
tree | 0962d17b0bf752ba4c009fb624f044b89fd6fd87 /scripts/lib/devtool/__init__.py | |
parent | c4e2c59088765d1f1de7ec57cde91980f887c2ff (diff) | |
download | poky-c0f2890c01882e9ea14e781c044f3a84f75bd0fc.tar.gz |
scripts: 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: 0a36bd96e6b29fd99a296efc358ca3e9fb5af735)
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 'scripts/lib/devtool/__init__.py')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py index 99c5534893..fd2f042ba5 100644 --- a/scripts/lib/devtool/__init__.py +++ b/scripts/lib/devtool/__init__.py | |||
@@ -87,13 +87,13 @@ def exec_watch(cmd, **options): | |||
87 | def exec_fakeroot(d, cmd, **kwargs): | 87 | def exec_fakeroot(d, cmd, **kwargs): |
88 | """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions""" | 88 | """Run a command under fakeroot (pseudo, in fact) so that it picks up the appropriate file permissions""" |
89 | # Grab the command and check it actually exists | 89 | # Grab the command and check it actually exists |
90 | fakerootcmd = d.getVar('FAKEROOTCMD', True) | 90 | fakerootcmd = d.getVar('FAKEROOTCMD') |
91 | if not os.path.exists(fakerootcmd): | 91 | if not os.path.exists(fakerootcmd): |
92 | logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built') | 92 | logger.error('pseudo executable %s could not be found - have you run a build yet? pseudo-native should install this and if you have run any build then that should have been built') |
93 | return 2 | 93 | return 2 |
94 | # Set up the appropriate environment | 94 | # Set up the appropriate environment |
95 | newenv = dict(os.environ) | 95 | newenv = dict(os.environ) |
96 | fakerootenv = d.getVar('FAKEROOTENV', True) | 96 | fakerootenv = d.getVar('FAKEROOTENV') |
97 | for varvalue in fakerootenv.split(): | 97 | for varvalue in fakerootenv.split(): |
98 | if '=' in varvalue: | 98 | if '=' in varvalue: |
99 | splitval = varvalue.split('=', 1) | 99 | splitval = varvalue.split('=', 1) |
@@ -179,7 +179,7 @@ def use_external_build(same_dir, no_same_dir, d): | |||
179 | logger.info('Using source tree as build directory since --same-dir specified') | 179 | logger.info('Using source tree as build directory since --same-dir specified') |
180 | elif bb.data.inherits_class('autotools-brokensep', d): | 180 | elif bb.data.inherits_class('autotools-brokensep', d): |
181 | logger.info('Using source tree as build directory since recipe inherits autotools-brokensep') | 181 | logger.info('Using source tree as build directory since recipe inherits autotools-brokensep') |
182 | elif d.getVar('B', True) == os.path.abspath(d.getVar('S', True)): | 182 | elif d.getVar('B') == os.path.abspath(d.getVar('S')): |
183 | logger.info('Using source tree as build directory since that would be the default for this recipe') | 183 | logger.info('Using source tree as build directory since that would be the default for this recipe') |
184 | else: | 184 | else: |
185 | b_is_s = False | 185 | b_is_s = False |
@@ -256,7 +256,7 @@ def ensure_npm(config, basepath, fixed_setup=False): | |||
256 | """ | 256 | """ |
257 | tinfoil = setup_tinfoil(config_only=True, basepath=basepath) | 257 | tinfoil = setup_tinfoil(config_only=True, basepath=basepath) |
258 | try: | 258 | try: |
259 | nativepath = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True) | 259 | nativepath = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE') |
260 | finally: | 260 | finally: |
261 | tinfoil.shutdown() | 261 | tinfoil.shutdown() |
262 | 262 | ||