summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-23 11:42:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-23 11:44:22 +0100
commit59aac6e134289d657d80bfb1d6f25b388d539818 (patch)
tree7a5cf87ad447eec4d73d0e9d69db9019fc9664e7
parentf03b7bc5f164afd9cbb0c2bd3a932bb85d968bf7 (diff)
downloadopenembedded-core-59aac6e134289d657d80bfb1d6f25b388d539818.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 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildhistory.bbclass8
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() {
python buildhistory_emit_pkghistory() {
if d.getVar('BB_CURRENTTASK') in ['populate_sysroot', 'populate_sysroot_setscene']:
bb.build.exec_func("buildhistory_emit_sysroot", d)
- elif not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:
+
+ if not d.getVar('BB_CURRENTTASK') in ['packagedata', 'packagedata_setscene']:
return 0
if not "package" in (d.getVar('BUILDHISTORY_FEATURES') or "").split():
@@ -228,9 +229,8 @@ python buildhistory_emit_pkghistory() {
break
except IOError as e:
if e.errno == errno.ENOENT:
- if not bb.data.inherits_class('native', d):
- # Probably a -cross recipe, just ignore
- return 0
+ # Probably a -cross recipe, just ignore
+ return 0
else:
raise