diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-23 11:42:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-26 22:08:36 +0000 |
commit | 14335a18ddb61625f15b483e90353174925a8871 (patch) | |
tree | 5bf026bd6b9a9c626f6b871059d667d645506c88 /meta | |
parent | a6d28c3b222511910505767e5efc9141675d3590 (diff) | |
download | poky-14335a18ddb61625f15b483e90353174925a8871.tar.gz |
Revert "classes/buildhistory: also save recipe info for native recipes"
This reverts commit d123606c4bef85c2436b40f51e47b602b7600c0b.
This change contains races as it will start poking into do_package task
directories from do_populate_sysroot. If we want to do this for native
recipes, we need to add guards around the package code and only make
this happen for native in populate_sysroot, not target in
populate_sysroot too. Backtrace from an example problem below:
ERROR: openssl-1.1.1g-r0 do_populate_sysroot: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:buildhistory_emit_pkghistory(d)
0003:
File: '/home/ross/Yocto/poky/meta/classes/buildhistory.bbclass', lineno: 319, function: buildhistory_emit_pkghistory
0315:
0316: write_pkghistory(pkginfo, d)
0317:
0318: # Create files-in-<package-name>.txt files containing a list of files of each recipe's package
*** 0319: bb.build.exec_func("buildhistory_list_pkg_files", d)
0320:}
0321:
0322:python buildhistory_emit_outputsigs() {
0323: if not "task" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 256, function: exec_func
0252: with bb.utils.fileslocked(lockfiles):
0253: if ispython:
0254: exec_func_python(func, d, runfile, cwd=adir)
0255: else:
*** 0256: exec_func_shell(func, d, runfile, cwd=adir)
0257:
0258: try:
0259: curcwd = os.getcwd()
0260: except:
File: '/home/ross/Yocto/poky/bitbake/lib/bb/build.py', lineno: 503, function: exec_func_shell
0499: with open(fifopath, 'r+b', buffering=0) as fifo:
0500: try:
0501: bb.debug(2, "Executing shell function %s" % func)
0502: with open(os.devnull, 'r+') as stdin, logfile:
*** 0503: bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
0504: except bb.process.ExecutionError as exe:
0505: # Find the backtrace that the shell trap generated
0506: backtrace_marker_regex = re.compile(r"WARNING: Backtrace \(BB generated script\)")
0507: stdout_lines = (exe.stdout or "").split("\n")
File: '/home/ross/Yocto/poky/bitbake/lib/bb/process.py', lineno: 184, function: run
0180: if not stderr is None:
0181: stderr = stderr.decode("utf-8")
0182:
0183: if pipe.returncode != 0:
*** 0184: raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
0185: return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804' failed with exit code 2:
/yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/temp/run.buildhistory_list_pkg_files.4158804: 183: cd: can't cd to /yocto/ross/build/tmp/work/neoversen1-poky-linux/openssl/1.1.1g-r0/packages-split/openssl-engines
(From OE-Core rev: 59aac6e134289d657d80bfb1d6f25b388d539818)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 6d04d8cfb9..7d5e3eb8fd 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -90,7 +90,8 @@ buildhistory_emit_sysroot() { | |||
90 | python buildhistory_emit_pkghistory() { | 90 | python buildhistory_emit_pkghistory() { |
91 | if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']: | 91 | if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']: |
92 | bb.build.exec_func("buildhistory_emit_sysroot", d) | 92 | bb.build.exec_func("buildhistory_emit_sysroot", d) |
93 | elif not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']: | 93 | |
94 | if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']: | ||
94 | return 0 | 95 | return 0 |
95 | 96 | ||
96 | if not "package" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): | 97 | if not "package" in (d.getVar('BUILDHISTORY_FEATURES') or "").split(): |
@@ -228,9 +229,8 @@ python buildhistory_emit_pkghistory() { | |||
228 | break | 229 | break |
229 | except IOError as e: | 230 | except IOError as e: |
230 | if e.errno == errno.ENOENT: | 231 | if e.errno == errno.ENOENT: |
231 | if not bb.data.inherits_class('native', d): | 232 | # Probably a -cross recipe, just ignore |
232 | # Probably a -cross recipe, just ignore | 233 | return 0 |
233 | return 0 | ||
234 | else: | 234 | else: |
235 | raise | 235 | raise |
236 | 236 | ||