]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.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:39:11 +0000 (13:39 +0000)
commitfc89a3f739ff25306ea91d9bdb424fc8389bdf72
tree12087cd9fa77f658058e7dd42eb5fc860123cf8c
parent02f89167a394d3a64ac0699f8ecae18563e560ab
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

(From OE-Core rev: aa87b1a4dcc14e4dfe719b6c55045c5662bc59c2)

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