Skip to contentSkip to conversation

Sergey Lapin : busybox: prevent postinst script from failing

oe-commits Roman I Khimov 2 participants 2 messages Apr 22, 2010

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

recent addition in rootfs_ipk.bbclass which runs postinst scripts with -e option, while very useful, prevents busybox from configuring at image build time. It will be configured at first image boot if your file system is writable, but in case of e.g. squashfs, that will be fatal error. This commit prevents postinst to fail, so busybox will create all needed links at image build time.

I don't think this is the way to solve it, because alternatives setup should work on build machine when everything is correct in packages. Most probably it fails because there is some other package installed which provides some program that is present in busybox, but that package doesn't use alternatives for (some of) its binaries.

Essentially, this is a bug in a package providing "full" version of the binary. You can easily debug those if you add "-x" switch to sh invocation in rootfs_ipk.bbclass, you'll see then where it fails in image do_rootfs log.

I've catched some of those in util-linux-ng and will push some patches later today.

#1 lore raw
Quoted 13 lines · Roman I Khimov
Quoted 6 lines

recent addition in rootfs_ipk.bbclass which runs postinst scripts with -e option, while very useful, prevents busybox from configuring at image build time. It will be configured at first image boot if your file system is writable, but in case of e.g. squashfs, that will be fatal error. This commit prevents postinst to fail, so busybox will create all needed links at image build time.

I don't think this is the way to solve it, because alternatives setup should work on build machine when everything is correct in packages. Most probably it fails because there is some other package installed which provides some program that is present in busybox, but that package doesn't use alternatives for (some of) its binaries.

Quoted 6 lines

Essentially, this is a bug in a package providing "full" version of the binary. You can easily debug those if you add "-x" switch to sh invocation in rootfs_ipk.bbclass, you'll see then where it fails in image do_rootfs log.

I've catched some of those in util-linux-ng and will push some patches later today.

That is probably not the best fix for the problem, but it doesn't make it any worse.
It will allow proper images to be built until better fix is provided.

While you're at this, please look into recipe for 'bc' tool, that is one which causes problems. While speaking about busybox - it RRECOMMENDS busybox-syslog which prevents normal syslog from being installed at image build time.
I'm a bit afraid to touch this part to not break images for others, probably some
"virtual/syslog" package is needed?

Thanks a lot,
S.