Commit 98650aca authored by Khem Raj's avatar Khem Raj Committed by Stefano Babic
Browse files

initscripts-swupdate-usb: Mark init with update alternatives



When using busybox init as main image's init system, postinsts for
busybox fails in swupdate-image because it tries to create link for
/sbin/init but it cant't because /sbin/init is already created by this
recipe but is not marked update alternative and build fails obscurely

ERROR: swupdate-image-1.0-r0 do_rootfs: Postinstall scriptlets of ['busybox'] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via 'exit 1' is no longer supported.

but the real error is inside log.do_rootfs

pdate-alternatives: Error: not linking /mnt/b/yoe/build/tmp/work/raspberrypi4_64-yoe-linux-musl/swupdate-image/1.0-r0/rootfs/sbin/init to /bin/busybox.nosuid since /mnt/b/yoe/build/tmp/work/raspberrypi4_64-yoe-linux-musl/swupdate-image/1.0-r0/rootfs/sbin/init exists and is not a link
Signed-off-by: default avatarKhem Raj <raj.khem@gmail.com>
Acked-by: Stefano Babic's avatarStefano Babic <sbabic@denx.de>
parent fc13404b
......@@ -11,15 +11,20 @@ RPROVIDES_${PN} += "virtual/initscripts-swupdate"
S = "${WORKDIR}"
inherit allarch update-alternatives
do_install () {
install -d ${D}/${sysconfdir}/init.d
install -d ${D}${base_sbindir}
install -m 755 ${S}/rcS.swupdate ${D}${base_sbindir}/init
}
ALTERNATIVE_PRIORITY = "300"
ALTERNATIVE_${PN} = "init"
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
ALTERNATIVE_PRIORITY[init] = "60"
PACKAGES = "${PN}"
FILES_${PN} = "/"
inherit allarch
CONFFILES_${PN} = ""
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment