Since busybox also provides the bootchartd command use the
update-alternatives mechanism to address this.
Also let bootchartd-stop-initscript RDEPENDS on bootchart2, since
/sbin/bootchartd is being called in that script.
Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
S = "${WORKDIR}/git"
SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
-inherit systemd
-inherit update-rc.d
-inherit python3native
+inherit systemd update-rc.d python3native update-alternatives
+
+ALTERNATIVE_${PN} = "bootchartd"
+ALTERNATIVE_LINK_NAME[bootchartd] = "${base_sbindir}/bootchartd"
+ALTERNATIVE_PRIORITY = "100"
# The only reason to build bootchart2-native is for a native pybootchartgui.
BBCLASSEXTEND = "native"
PACKAGES =+ "bootchartd-stop-initscript"
FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
+RDEPENDS_bootchartd-stop-initscript = "${PN}"
FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
FILES_${PN} += "${base_libdir}/bootchart/tmpfs"