summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2015-04-27 10:53:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-28 09:44:14 +0100
commiteabd7359d164754b17dddedd21d95e33bd75b39f (patch)
treeae2159d9b182c961d31a8b46d98cf6c4beec019c /scripts/lib/devtool/standard.py
parentaf86c079dd9942748cfe920871db6d3f5130e05a (diff)
downloadast2050-yocto-poky-eabd7359d164754b17dddedd21d95e33bd75b39f.zip
ast2050-yocto-poky-eabd7359d164754b17dddedd21d95e33bd75b39f.tar.gz
devtool: modify: use B=S if that is the default for the recipe
Makes the build succeed for packages which do not support separate build directory, e.g. zlib. The same outcome could be achieved with the --same-dir option, but, it's generally hard to tell if a random package would need that option. The negative side effect of this patch is that dev srctree (of some packages that build fine without this modification) gets dirtied by build artefacts. (From OE-Core master rev: 6ac5692426956e276ba2119f917b0f30791e6cd6) (From OE-Core rev: 97078c56e8b8a235e923d964253775e20112a36f) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index d5ded2f..fbac34e 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -384,12 +384,19 @@ def modify(args, config, basepath, workspace):
f.write('inherit externalsrc\n')
f.write('# NOTE: We use pn- overrides here to avoid affecting multiple variants in the case where the recipe uses BBCLASSEXTEND\n')
f.write('EXTERNALSRC_pn-%s = "%s"\n' % (args.recipename, srctree))
- if args.same_dir or bb.data.inherits_class('autotools-brokensep', rd):
- if args.same_dir:
- logger.info('using source tree as build directory since --same-dir specified')
- else:
- logger.info('using source tree as build directory since original recipe inherits autotools-brokensep')
+
+ b_is_s = True
+ if args.same_dir:
+ logger.info('using source tree as build directory since --same-dir specified')
+ elif bb.data.inherits_class('autotools-brokensep', rd):
+ logger.info('using source tree as build directory since original recipe inherits autotools-brokensep')
+ elif rd.getVar('B', True) == s:
+ logger.info('using source tree as build directory since that is the default for this recipe')
+ else:
+ b_is_s = False
+ if b_is_s:
f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (args.recipename, srctree))
+
if initial_rev:
f.write('\n# initial_rev: %s\n' % initial_rev)
for commit in commits:
OpenPOWER on IntegriCloud