update-rc.d: correctly look up the initscript params with overrides
The creation of a clone of d with extra OVERRIDES was removed in 72c1fd72d3b479c728e249eaa763116d352e945b but some of the lookups are essential so that variables such as ${INITSCRIPT_PARAMS} get overriden and resolved correctly on a per-package basis. [ YOCTO #3960 ] (From OE-Core rev: b016bc9aaabc90fe4dc98af8c5e73dfcb4526ef4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
51cc49ddda
commit
8cab6d76f8
|
@ -62,22 +62,28 @@ python populate_packages_updatercd () {
|
||||||
execute on the target. Not doing so may cause update_rc.d postinst invoked
|
execute on the target. Not doing so may cause update_rc.d postinst invoked
|
||||||
twice to cause unwanted warnings.
|
twice to cause unwanted warnings.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
localdata = bb.data.createCopy(d)
|
||||||
|
overrides = localdata.getVar("OVERRIDES", True)
|
||||||
|
localdata.setVar("OVERRIDES", "%s:%s" % (pkg, overrides))
|
||||||
|
bb.data.update_data(localdata)
|
||||||
|
|
||||||
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
|
postinst = d.getVar('pkg_postinst_%s' % pkg, True)
|
||||||
if not postinst:
|
if not postinst:
|
||||||
postinst = '#!/bin/sh\n'
|
postinst = '#!/bin/sh\n'
|
||||||
postinst += d.getVar('updatercd_postinst', True)
|
postinst += localdata.getVar('updatercd_postinst', True)
|
||||||
d.setVar('pkg_postinst_%s' % pkg, postinst)
|
d.setVar('pkg_postinst_%s' % pkg, postinst)
|
||||||
|
|
||||||
prerm = d.getVar('pkg_prerm_%s' % pkg, True)
|
prerm = d.getVar('pkg_prerm_%s' % pkg, True)
|
||||||
if not prerm:
|
if not prerm:
|
||||||
prerm = '#!/bin/sh\n'
|
prerm = '#!/bin/sh\n'
|
||||||
prerm += d.getVar('updatercd_prerm', True)
|
prerm += localdata.getVar('updatercd_prerm', True)
|
||||||
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
d.setVar('pkg_prerm_%s' % pkg, prerm)
|
||||||
|
|
||||||
postrm = d.getVar('pkg_postrm_%s' % pkg, True)
|
postrm = d.getVar('pkg_postrm_%s' % pkg, True)
|
||||||
if not postrm:
|
if not postrm:
|
||||||
postrm = '#!/bin/sh\n'
|
postrm = '#!/bin/sh\n'
|
||||||
postrm += d.getVar('updatercd_postrm', True)
|
postrm += localdata.getVar('updatercd_postrm', True)
|
||||||
d.setVar('pkg_postrm_%s' % pkg, postrm)
|
d.setVar('pkg_postrm_%s' % pkg, postrm)
|
||||||
|
|
||||||
# Check that this class isn't being inhibited (generally, by
|
# Check that this class isn't being inhibited (generally, by
|
||||||
|
|
Loading…
Reference in New Issue