Openembedded Core Discussions
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] Fix first boot deferral and postinst error reporting
@ 2018-01-08 12:45 Alexander Kanavin
  2018-01-08 12:45 ` [RFC PATCH 1/6] postinst_intercepts: add a delay_to_first_boot hook Alexander Kanavin
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Alexander Kanavin @ 2018-01-08 12:45 UTC (permalink / raw)
  To: openembedded-core

This patchset is aiming to fix long-standing problems with package post-installation
scriptlets:

1) The way to defer them to first boot is to issue 'exit 1'. On the other hand,
'exit 1' is also the way to indicate an error in the script. The patches decouple
these two things.

2) Scriptlets should be executed using '-e', otherwise failing commands in
the middle of the scriptlet will not be reported as such.

3) The patchset also adds a convenient shortcut for deferring scriptlets to
first boot execution:

pkg_postinst_ontarget_PACKAGENAME() {
      # Actions to carry out on the device go here
      ....
}

Please review the following changes for suitability for inclusion. If you have
any objections or suggestions for improvement, please respond to the patches. If
you agree with the changes, please provide your Acked-by.

The following changes since commit 205cfd702190026e64eed9cae27c05ff62d1637e:

  bitbake: fetch2/__init__: Disable pseudo in runfetchcmd() (2018-01-08 08:48:54 +0000)

are available in the Git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/dnf-rpm4-postinst-fix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4-postinst-fix

Alexander Kanavin (6):
  postinst_intercepts: add a delay_to_first_boot hook
  meta/lib/oe/rootfs.py: separate first boot deferral logic into a
    separate function
  meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when
    processing postinst_intercept hooks
  package.bbclass: add support for pkg_postinst_ontarget()
  meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer
    to first boot
  package_rpm.bbclass: run pre/post installation scriptlets using sh -e

 .../recipes-test/postinst/postinst_1.0.bb          | 14 ++------
 meta/classes/package.bbclass                       | 20 +++++++++++
 meta/classes/package_rpm.bbclass                   |  8 ++---
 meta/lib/oe/package_manager.py                     |  3 ++
 meta/lib/oe/rootfs.py                              | 39 +++++++++++++---------
 scripts/postinst-intercepts/delay_to_first_boot    |  2 ++
 6 files changed, 54 insertions(+), 32 deletions(-)
 create mode 100644 scripts/postinst-intercepts/delay_to_first_boot

-- 
2.15.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-08 12:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-08 12:45 [RFC PATCH 0/6] Fix first boot deferral and postinst error reporting Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 1/6] postinst_intercepts: add a delay_to_first_boot hook Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 2/6] meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate function Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 3/6] meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing postinst_intercept hooks Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 4/6] package.bbclass: add support for pkg_postinst_ontarget() Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 5/6] meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to first boot Alexander Kanavin
2018-01-08 12:45 ` [RFC PATCH 6/6] package_rpm.bbclass: run pre/post installation scriptlets using sh -e Alexander Kanavin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox