]> code.ossystems Code Review - openembedded-core.git/commit
classes: Fix alternatives and rc.d ordering
authorDavid Vincent <freesilicon@gmail.com>
Tue, 20 Dec 2016 09:47:45 +0000 (10:47 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jan 2017 13:27:01 +0000 (13:27 +0000)
commitaa87b1a4dcc14e4dfe719b6c55045c5662bc59c2
tree48b528d02d3397e215bf655b09b5c20e3a09233b
parent9ddcfb51e637acba82089da6430ac77e29f0f1ef
classes: Fix alternatives and rc.d ordering

When using an alternative as an initscript, the ordering between
update-rc.d and update-alternatives tasks during prerm and postinst
tasks must always be the following in order to work:
  * prerm:
    - stop daemon
    - remove alternative

  * postinst:
    - add alternative
    - start daemon

This patchset adds comments to the scripts generated by both classes and
organize the generated sections based on those comments.

[YOCTO #10433]

Changes since v5:
    - Remove boolean in d.getVar() calls

Signed-off-by: David Vincent <freesilicon@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/update-alternatives.bbclass
meta/classes/update-rc.d.bbclass