All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 0/7] Fix first boot deferral and postinst error reporting
Date: Mon, 29 Jan 2018 14:01:27 +0200	[thread overview]
Message-ID: <cover.1517227178.git.alexander.kanavin@linux.intel.com> (raw)

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
      ....
}

The following changes since commit 0c537554fc2cf58a9cbfeaf39ed918c607483dce:

  testimage: enable gi test suite (2018-01-29 10:31:58 +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 (7):
  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
  rootfs.py: change the notice about deferring scripts to first boot
    from warning to a note

 .../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



             reply	other threads:[~2018-01-29 12:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 12:01 Alexander Kanavin [this message]
2018-01-29 12:01 ` [PATCH 1/7] postinst_intercepts: add a delay_to_first_boot hook Alexander Kanavin
2018-01-29 12:01 ` [PATCH 2/7] meta/lib/oe/rootfs.py: separate first boot deferral logic into a separate function Alexander Kanavin
2018-01-29 12:01 ` [PATCH 3/7] meta/lib/oe/rootfs.py: do not execute defer_to_first_boot when processing postinst_intercept hooks Alexander Kanavin
2018-01-29 12:01 ` [PATCH 4/7] package.bbclass: add support for pkg_postinst_ontarget() Alexander Kanavin
2018-01-29 12:01 ` [PATCH 5/7] meta/lib/oe/package_manager.py: deprecate 'exit 1' as a way to defer to first boot Alexander Kanavin
2018-01-29 12:01 ` [PATCH 6/7] package_rpm.bbclass: run pre/post installation scriptlets using sh -e Alexander Kanavin
2018-01-29 12:01 ` [PATCH 7/7] rootfs.py: change the notice about deferring scripts to first boot from warning to a note Alexander Kanavin
2018-01-29 12:14 ` [PATCH 0/7] Fix first boot deferral and postinst error reporting Diaz de Grenu, Jose
2018-01-29 12:34 ` ✗ patchtest: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1517227178.git.alexander.kanavin@linux.intel.com \
    --to=alexander.kanavin@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.