mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-06-06 02:42:34 +00:00
ti-sgx-ddk-um: fix error in postinst with sysvinit+udev
When sysvinit is in DISTRO_FEATURES, the update-rc.d class must only be inherited when the script referenced by INITSCRIPT_NAME actually exists, or the update-rc.d command in the generated postinst script will fail. Reported-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Reviewed-by: Andrew Davis <afd@ti.com> Acked-by: Denys Dmytriyenko <denys@konsulko.com> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
This commit is contained in:
committed by
Ryan Eatmon
parent
994fa26a12
commit
b492cb8457
@@ -24,11 +24,16 @@ TARGET_PRODUCT:am65xx = "ti654x"
|
||||
INITSCRIPT_NAME = "rc.pvr"
|
||||
INITSCRIPT_PARAMS = "defaults 8"
|
||||
|
||||
inherit update-rc.d
|
||||
|
||||
PACKAGECONFIG ??= "udev"
|
||||
PACKAGECONFIG[udev] = ",,,udev"
|
||||
|
||||
def use_initscript(d):
|
||||
sysvinit = bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d)
|
||||
udev = bb.utils.contains('PACKAGECONFIG', 'udev', True, False, d)
|
||||
return sysvinit and not udev
|
||||
|
||||
inherit ${@oe.utils.ifelse(use_initscript(d), 'update-rc.d', '')}
|
||||
|
||||
RDEPENDS:${PN} += "libdrm libdrm-omap"
|
||||
|
||||
RRECOMMENDS:${PN} += "ti-sgx-ddk-km"
|
||||
@@ -42,7 +47,7 @@ do_install () {
|
||||
with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)}
|
||||
|
||||
# Delete initscript if it is not needed or would conflict with the udev rules
|
||||
if $without_sysvinit || $with_udev; then
|
||||
if ${@oe.utils.ifelse(use_initscript(d), 'false', 'true')}; then
|
||||
rm -rf ${D}${sysconfdir}/init.d
|
||||
rmdir --ignore-fail-on-non-empty ${D}${sysconfdir}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user