poky/scripts/lib
Paul Eggleton b52d58b8bb devtool: upgrade: fix handling of errors parsing upgraded recipe
As part of upgrading a recipe we create the upgraded recipe file in the
workspace and then try to parse it so we can then make further
modifications. If for some reason that parsing fails then the failure
was not being handled very well - the broken recipe was being left in
place, breaking parsing until it was removed by hand. Fix that by adding
a call to the cleanup function, and fix the following issues:

* Fix the cleanup function which doesn't look like it has ever worked
  due to a typo in the function call

* Fix double-printing the error message

* Remove usage of DevtoolError in this case (DevtoolError is for simple
  usage errors, not this kind of issue which may be the result of a
  bug).

We're still printing a traceback in this scenario but at least it
doesn't break the build system requiring manual cleanup. I also
introduced a command-line option to preserve the broken upgraded recipe
file(s) for debugging purposes.

(The reproducer for this is "devtool upgrade libnewt-python", however
you need to check out revision b82ea144e1
or earlier since that recipe has now been absorbed into the libnewt
recipe. The libnewt-python recipe was causing an issue with the upgrade
because it actually included the libnewt recipe using ${PV} in the
include statement, and of course PV was changing in the upgrade.)

Fixes [YOCTO #13404].

(From OE-Core rev: c519ac360796675d7fc09a5250d21f0f5b6236fc)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-03 17:00:57 +01:00
..
build_perf meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
checklayer meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
devtool devtool: upgrade: fix handling of errors parsing upgraded recipe 2019-07-03 17:00:57 +01:00
recipetool recipetool: ignore zero-length setup.py files 2019-07-03 17:00:57 +01:00
resulttool resulttool/merge: Enable control TESTSERIES and extra configurations 2019-06-12 10:54:40 +01:00
wic wic: python2 -> python3 2019-06-30 22:40:52 +01:00
argparse_oe.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
buildstats.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
scriptpath.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00
scriptutils.py meta/lib+scripts: Convert to SPDX license headers 2019-05-09 16:31:55 +01:00