]> code.ossystems Code Review - openembedded-core.git/commit
meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to first boot
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>
Mon, 29 Jan 2018 12:01:32 +0000 (14:01 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Jan 2018 23:08:12 +0000 (23:08 +0000)
commitd12cf56e9ff2a4f13dfbef9290ea5647b52b3f6d
tree2b1c1b8ecba49cd4612c9c96c021f8d161320523
parent229f4e975fb6957f44b5c56735fd6d58564098d7
meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to first boot

'exit 1' is not optimal for two reasons:

1) Code is hard to read; it is not obvious that it means 'defer what follows to first boot'.
2) Worse, this hides actual errors in the scriptlets; there is no difference between scriptlet
failing because it's intended to be run on target and scriptlet failing because there's a bug or
a regression somewhere.

The new, supported way is to place the code that has to run on target into pkg_postinst_ontarget(),
or, if a more fine-tuned control is required, call 'postinst-intercepts defer_to_first_boot' from
pkg_postinst() to explicitly request deferral to first boot.

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/package_manager.py