generic-poky/scripts
Patrick Ohly ef0c54ab70 yocto-compat-layer: improve error handling in signature creation
When "bitbake -k -S none world" failed, the error printed by
yocto-compat-layer.py contained the stack trace multiple times and did not
contain the stderr output from bitbake, making the error hard to understand
and debug:

  INFO: ======================================================================
  INFO: ERROR: test_signatures (common.CommonCompatLayer)
  INFO: ----------------------------------------------------------------------
  INFO: Traceback (most recent call last):
    File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures
      stderr=subprocess.PIPE)
    File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
      raise CalledProcessError(retcode, process.args, output=output)
  subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures
      curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
    File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 149, in get_signatures
      raise RuntimeError(msg)
  RuntimeError: Traceback (most recent call last):
    File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 144, in get_signatures
      stderr=subprocess.PIPE)
    File "/usr/lib/python3.4/subprocess.py", line 620, in check_output
      raise CalledProcessError(retcode, process.args, output=output)
  subprocess.CalledProcessError: Command 'bitbake -k -S none world' returned non-zero exit status 1

  Loading cache...done.
  Loaded 1328 entries from dependency cache.
  NOTE: Resolving any missing task queue dependencies
  NOTE: Runtime target 'zlib-qat' is unbuildable, removing...
  Missing or unbuildable dependency chain was: ['zlib-qat']
  ...
  Summary: There were 5 ERROR messages shown, returning a non-zero exit code.

The yocto-compat-layer.log was incomplete, it only had the first part
without the command output.

stderr was missing due to stderr=subprocess.PIPE.

Instead of the complicated try/except construct it's better to check
the return code ourselves and raise just a single exception. The
output (both on stderr and in the yocto-compat-layer.log) now is:

  INFO: ======================================================================
  INFO: ERROR: test_signatures (common.CommonCompatLayer)
  INFO: ----------------------------------------------------------------------
  INFO: Traceback (most recent call last):
    File "/fast/work/poky/scripts/lib/compatlayer/cases/common.py", line 51, in test_signatures
      curr_sigs = get_signatures(self.td['builddir'], failsafe=True)
    File "/fast/work/poky/scripts/lib/compatlayer/__init__.py", line 147, in get_signatures
      raise RuntimeError(msg)
  RuntimeError: Generating signatures failed. This might be due to some parse error and/or general layer incompatibilities.
  Command: bitbake -k -S none world
  Output:
  Loading cache...done.
  Loaded 1328 entries from dependency cache.
  NOTE: Resolving any missing task queue dependencies
  ERROR: Nothing PROVIDES 'qat16' (but /fast/work/meta-intel/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb DEPENDS on or otherwise requires it)
  ERROR: qat16 was skipped: incompatible with machine qemux86 (not in COMPATIBLE_MACHINE)
  ...
  Missing or unbuildable dependency chain was: ['openssl-qat-dev']
  ...
  Summary: There were 5 ERROR messages shown, returning a non-zero exit code.

(From OE-Core rev: 5b9ac62ab535d2791b9713857e1016f49f53dd8d)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-16 22:11:32 +00:00
..
contrib build-perf-test-wrapper.sh: support xml report format 2017-03-04 23:18:18 +00:00
lib yocto-compat-layer: improve error handling in signature creation 2017-03-16 22:11:32 +00:00
native-intercept native.bbclass: Add a simple chown intercept command 2011-06-23 21:08:01 +01:00
postinst-intercepts gio-module-cache: Add class for Gio modules 2016-03-28 15:55:49 +01:00
pybootchartgui pybootchartgui: support reading reduced /proc logs 2016-12-07 10:38:00 +00:00
tiny scripts: python3 fixes and new tool ksum 2017-01-16 18:05:14 +00:00
README Further cleanup of various poky references 2011-04-21 12:56:16 +01:00
bitbake-prserv-tool bitbake-prserv-tool: check file name 2015-11-25 07:50:30 +00:00
bitbake-whatchanged scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
buildhistory-collect-srcrevs buildhistory-collect-srcrevs: Fix multiple SRCREV definitions 2016-10-28 16:15:17 +01:00
buildhistory-diff buildhistory-diff: suggest correct version of PythonGit 2016-06-12 23:47:17 +01:00
buildstats-diff scripts/buildstats-diff: fix epoch numbers in --ver-diff 2017-02-23 12:49:48 -08:00
cleanup-workdir scripts/cleanup-workdir: Adapt to SDK_ARCH -> SDK_SYS chanages for crosssdk 2016-09-28 10:16:03 +01:00
combo-layer combo-layer: handle file_exclude matching dirs 2016-10-28 16:15:21 +01:00
combo-layer-hook-default.sh combo-layer-hook-default.sh: handle patches without Signed-off-by 2015-03-20 11:21:25 +00:00
combo-layer.conf.example combo-layer: partial import for '--history init' 2015-03-20 11:21:24 +00:00
cp-noerror scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
create-pull-request create-pull-request: fix for OE cgit URL change 2017-01-23 12:05:22 +00:00
crosstap crosstap: Changes to support Recipe specific sysroot 2017-03-08 11:52:56 +00:00
devtool devtool: check locale and refuse to start if it isn't UTF-8 2017-01-23 12:05:22 +00:00
gen-lockedsig-cache gen-lockedsig-cache: ensure symlinks are dereferenced 2016-08-17 10:35:40 +01:00
gen-site-config siteconfig: generate configuration data caches for autoconf 2010-09-03 10:50:02 +01:00
lnr scripts/lnr: update for python3 2016-06-01 12:47:10 +01:00
multilib_header_wrapper.h multilib_header.bbclass: Add oe_multilib_header wrapper 2011-07-27 15:45:47 +01:00
oe-build-perf-test oe-build-perf-test: drop --commit-results 2017-02-15 20:06:41 -08:00
oe-buildenv-internal oe-buildenv-internal: show usage output 2016-12-13 22:55:21 +00:00
oe-check-sstate devtool/recipetool/meta: Adapt to bitbake API changes for multi-configuration builds 2016-08-18 10:07:23 +01:00
oe-find-native-sysroot oe-find-native-sysroot: create usage output 2016-12-13 22:55:21 +00:00
oe-git-archive scripts/oe-git-archive: support creating bare repositories 2017-02-15 20:06:41 -08:00
oe-git-proxy oe-git-proxy: create usage output 2016-12-13 22:55:21 +00:00
oe-gnome-terminal-phonehome terminal: Fix gnome-terminal to work with recent versions 2016-07-08 10:50:18 +01:00
oe-pkgdata-util scripts: remove True option to getVar calls 2016-12-16 10:23:23 +00:00
oe-publish-sdk oe-publish-sdk: add pyshtables.py to .gitignore 2017-01-31 14:43:00 +00:00
oe-run-native oe-run-native: standardize usage output 2016-12-13 22:55:20 +00:00
oe-selftest selftest: automatically add the meta-selftest layer 2017-01-23 12:05:22 +00:00
oe-setup-builddir oe-setup-builddir: create usage output 2016-12-13 22:55:20 +00:00
oe-setup-rpmrepo scripts/oe-setup-rpmrepo: replace createrepo with createrepo_c 2017-03-14 14:42:17 +00:00
oe-test testexport.bbclass: Migrate testexport to use new framework 2017-01-23 12:05:21 +00:00
oe-trim-schemas oe-trim-schemas: create usage output 2016-12-13 22:55:20 +00:00
oepydevshell-internal.py oepydevshell-internal.py: standardize usage output 2016-12-13 22:55:21 +00:00
opkg-query-helper.py scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
pythondeps scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
recipetool scripts: remove True option to getVar calls 2016-12-16 10:23:23 +00:00
relocate_sdk.py relocate_sdk.py: skip debug files from relocation 2017-03-08 11:52:57 +00:00
rootfs_rpm-extract-postinst.awk meta/classes/rootfs_rpm.bbclass: re implement base on rpm5 2010-07-24 00:46:57 +01:00
rpm2cpio.sh scripts/rpm2cpio.sh: replace 5.x version with 4.x version 2017-03-14 14:42:17 +00:00
runqemu scripts/runqemu: avoid overridden user input for bootparams 2017-03-04 23:18:18 +00:00
runqemu-addptable2image scripts/oe-setup-builddir: Fix up OE-Core/Poky mismatch for now (and fix permissions) 2011-04-21 19:19:33 +01:00
runqemu-export-rootfs runqemu: support multiple qemus running when nfs 2017-01-23 12:05:22 +00:00
runqemu-extract-sdk runqemu-extract-sdk: normalize paths to improve output 2014-07-03 17:41:16 +01:00
runqemu-gen-tapdevs runqemu-gen-tapdevs: Improve help text with an example 2017-03-10 14:50:11 +00:00
runqemu-ifdown runqemu-ifdown: clean up the remaining iptables rules 2013-08-30 16:23:47 +01:00
runqemu-ifup runqemu-ifup: Check if the tap interface is set up correctly 2015-10-27 07:24:28 +00:00
runqemu.README scripts/runqemu.README: Clean this up to accurately reflect what the runqemu command now does 2011-04-21 12:56:13 +01:00
send-error-report send-error-report: encode data to bytes 2016-06-03 13:13:30 +01:00
send-pull-request scripts/send-pull-request: Avoid multiple chain headers 2016-12-07 10:37:59 +00:00
sstate-cache-management.sh scripts/sstate-cache-management.sh: Change wording 2016-02-15 16:28:43 +00:00
sstate-diff-machines.sh sstate-diff-machines.sh: Return non-zero return code when there was some failure detected 2014-06-29 09:04:22 +01:00
sstate-sysroot-cruft.sh sstate-sysroot-cruft: Add /etc/ld.so.conf to whitelist 2016-10-28 16:15:19 +01:00
sysroot-relativelinks.py scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
task-time task-time: Add simple buildstats analysis script 2016-11-06 23:35:36 +00:00
test-dependencies.sh test-dependencies.sh: Strip also '\.bb: .*' before adding failed recipe to list of failed 2016-10-28 16:15:19 +01:00
test-reexec test-reexec: Add script to address issues when task re-execution 2012-05-18 15:25:11 +01:00
test-remote-image scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
verify-bashisms verify-bashisms: support warnings with more than one line of source code 2017-01-31 15:28:41 +00:00
wic wic: use image recipe sysroot as default 2017-03-04 23:18:18 +00:00
yocto-bsp yocto-bsp: Refactor script to use argparse instead of optparse 2016-07-07 13:38:13 +01:00
yocto-compat-layer.py yocto-compat-layer.py: Add script to YP Compatible Layer validation 2017-03-04 23:18:19 +00:00
yocto-kernel scripts: Fixed typo in parameter that was causing exception 2016-07-07 13:38:13 +01:00
yocto-layer scripts: Fixed typo in parameter that was causing exception 2016-07-07 13:38:13 +01:00

README

This directory contains Various useful scripts for working with OE builds