diff options
author | Mark Hatle <mark.hatle@kernel.crashing.org> | 2021-03-25 17:44:02 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-04-06 22:45:36 +0100 |
commit | 453baa53365c8c66788adab134c11bb498dccab2 (patch) | |
tree | 45a9cf6e9cd6bd515e83b1a6e2dd9c7f9c79104b | |
parent | d3e2889a1ec0a6e9a8b395032ea682678a2094e9 (diff) | |
download | poky-453baa53365c8c66788adab134c11bb498dccab2.tar.gz |
populate_sdk_ext: Avoid copying and producing .pyc files
Since pyc cache files are really system specific, no real reason to copy or
generate them during the eSDK build process. Also generating them has the
possibility of re-using inodes that pseudo may have been tracking, leading
a build failure.
(From OE-Core rev: e3d027b48bf54fef9420cd1cd4f04a9bedf8d032)
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit ce8eba263647ae63a722122e28f26af46ae083a0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 4 | ||||
-rw-r--r-- | meta/lib/oe/copy_buildsystem.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index d63abf4f30..aa00d5397c 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -247,7 +247,9 @@ python copy_buildsystem () { | |||
247 | 247 | ||
248 | # Create a layer for new recipes / appends | 248 | # Create a layer for new recipes / appends |
249 | bbpath = d.getVar('BBPATH') | 249 | bbpath = d.getVar('BBPATH') |
250 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')]) | 250 | env = os.environ.copy() |
251 | env['PYTHONDONTWRITEBYTECODE'] = '1' | ||
252 | bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')], env=env) | ||
251 | 253 | ||
252 | # Create bblayers.conf | 254 | # Create bblayers.conf |
253 | bb.utils.mkdirhier(baseoutpath + '/conf') | 255 | bb.utils.mkdirhier(baseoutpath + '/conf') |
diff --git a/meta/lib/oe/copy_buildsystem.py b/meta/lib/oe/copy_buildsystem.py index 31a84f5b06..d97bf9d1b9 100644 --- a/meta/lib/oe/copy_buildsystem.py +++ b/meta/lib/oe/copy_buildsystem.py | |||
@@ -20,7 +20,7 @@ def _smart_copy(src, dest): | |||
20 | mode = os.stat(src).st_mode | 20 | mode = os.stat(src).st_mode |
21 | if stat.S_ISDIR(mode): | 21 | if stat.S_ISDIR(mode): |
22 | bb.utils.mkdirhier(dest) | 22 | bb.utils.mkdirhier(dest) |
23 | cmd = "tar --exclude='.git' --xattrs --xattrs-include='*' -chf - -C %s -p . \ | 23 | cmd = "tar --exclude='.git' --exclude='__pycache__' --xattrs --xattrs-include='*' -chf - -C %s -p . \ |
24 | | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dest) | 24 | | tar --xattrs --xattrs-include='*' -xf - -C %s" % (src, dest) |
25 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) | 25 | subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) |
26 | else: | 26 | else: |
@@ -259,7 +259,7 @@ def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cac | |||
259 | bb.note('Generating sstate-cache...') | 259 | bb.note('Generating sstate-cache...') |
260 | 260 | ||
261 | nativelsbstring = d.getVar('NATIVELSBSTRING') | 261 | nativelsbstring = d.getVar('NATIVELSBSTRING') |
262 | bb.process.run("gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or '')) | 262 | bb.process.run("PYTHONDONTWRITEBYTECODE=1 gen-lockedsig-cache %s %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring, filterfile or '')) |
263 | if fixedlsbstring and nativelsbstring != fixedlsbstring: | 263 | if fixedlsbstring and nativelsbstring != fixedlsbstring: |
264 | nativedir = output_sstate_cache + '/' + nativelsbstring | 264 | nativedir = output_sstate_cache + '/' + nativelsbstring |
265 | if os.path.isdir(nativedir): | 265 | if os.path.isdir(nativedir): |
@@ -286,7 +286,7 @@ def check_sstate_task_list(d, targets, filteroutfile, cmdprefix='', cwd=None, lo | |||
286 | logparam = '-l %s' % logfile | 286 | logparam = '-l %s' % logfile |
287 | else: | 287 | else: |
288 | logparam = '' | 288 | logparam = '' |
289 | cmd = "%sBB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o %s %s" % (cmdprefix, targets, filteroutfile, logparam) | 289 | cmd = "%sPYTHONDONTWRITEBYTECODE=1 BB_SETSCENE_ENFORCE=1 PSEUDO_DISABLED=1 oe-check-sstate %s -s -o %s %s" % (cmdprefix, targets, filteroutfile, logparam) |
290 | env = dict(d.getVar('BB_ORIGENV', False)) | 290 | env = dict(d.getVar('BB_ORIGENV', False)) |
291 | env.pop('BUILDDIR', '') | 291 | env.pop('BUILDDIR', '') |
292 | env.pop('BBPATH', '') | 292 | env.pop('BBPATH', '') |