Re: [yocto] coreutils postinstall warning
On Fri, Sep 14, 2018 at 07:38:49AM -0500, Seth Bollinger wrote: > On Mon, Aug 20, 2018 at 8:16 AM Seth Bollinger wrote: > > > Hello All, > > > > We've been seeing the following warning for a while now. Is this expected? > > > > WARNING: manuf-image-1.0-r0 do_rootfs: Intentionally failing postinstall > > scriptlets of ['coreutils'] to defer them to first boot is deprecated. > > Please place them into pkg_postinst_ontarget_${PN} (). > > > > From what I can see, it's being caused by update-alternatives. Is there a > > workaround for this? > > > > I'll answer my own question since it may be of value to someone else. > > coreutils, util-linux and busybox all provide overlapping utilities. Most > are covered by update alternatives, some are not. If you have enabled one > of those in busybox, then update alternatives will fail trying to make the > symbolic link. As I understand it (from the warning message) is that > failing the postinst step used to be a way to ask to be executed at target > runtime. The solution is to have only one package provide the conflicting > utility (or add alternatives to all packages that provide the utility). Using u-a for all conflicting binaries is the preferred option. For example there was fix for nice provided by coreutils merged recently: http://git.openembedded.org/openembedded-core/commit/?id=57b1b20abca7d6821e99802147b93f4f577cfad0 or setfattr in attr: http://git.openembedded.org/openembedded-core/commit/?id=d633633f3d83467fe1f946c57e2e75e0e774ec7e busybox have a lot of available applets and people tend to enable/disable them in their own defconfigs quite often, removing something from util-linux or coreutils would break it for people who disabled the same in busybox defconfig and vice versa, u-a on the other hand will work reasonably for everybody. If you have conflict with unshare, just send a patch. I will do the same with printenv for coreutils which I have in .bbappend for way too long. Regards, > > Here's an example error message: > update-alternatives: Error: not linking > /home/seth/projects/awusb/build/tmp/work/awusb1012-awusb-linux/awusb-image/1.0-r0/rootfs/usr/bin/unshare > to /bin/busybox.nosuid since > /home/seth/projects/awusb/build/tmp/work/awusb1012-awusb-linux/awusb-image/1.0-r0/rootfs/usr/bin/unshare > exists and is not a link > > Seth > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com signature.asc Description: Digital signature -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] coreutils postinstall warning
On Mon, Aug 20, 2018 at 8:16 AM Seth Bollinger wrote: > Hello All, > > We've been seeing the following warning for a while now. Is this expected? > > WARNING: manuf-image-1.0-r0 do_rootfs: Intentionally failing postinstall > scriptlets of ['coreutils'] to defer them to first boot is deprecated. > Please place them into pkg_postinst_ontarget_${PN} (). > > From what I can see, it's being caused by update-alternatives. Is there a > workaround for this? > I'll answer my own question since it may be of value to someone else. coreutils, util-linux and busybox all provide overlapping utilities. Most are covered by update alternatives, some are not. If you have enabled one of those in busybox, then update alternatives will fail trying to make the symbolic link. As I understand it (from the warning message) is that failing the postinst step used to be a way to ask to be executed at target runtime. The solution is to have only one package provide the conflicting utility (or add alternatives to all packages that provide the utility). Here's an example error message: update-alternatives: Error: not linking /home/seth/projects/awusb/build/tmp/work/awusb1012-awusb-linux/awusb-image/1.0-r0/rootfs/usr/bin/unshare to /bin/busybox.nosuid since /home/seth/projects/awusb/build/tmp/work/awusb1012-awusb-linux/awusb-image/1.0-r0/rootfs/usr/bin/unshare exists and is not a link Seth -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] coreutils postinstall warning
On Mon, Aug 20, 2018 at 8:31 AM Alexander Kanavin wrote: > 2018-08-20 15:16 GMT+02:00 Seth Bollinger : > > We've been seeing the following warning for a while now. Is this > expected? > > > > WARNING: manuf-image-1.0-r0 do_rootfs: Intentionally failing postinstall > > scriptlets of ['coreutils'] to defer them to first boot is deprecated. > > Please place them into pkg_postinst_ontarget_${PN} (). > > > > From what I can see, it's being caused by update-alternatives. Is there > a > > workaround for this? > > You need to investigate further, specifically why the postinst > scriptlet is failing. Usually log.do_rootfs should give a hint. > This seems to be the issue. I should mention this is sumo coreutils. update-alternatives: renaming link link from /bin/link to /usr/bin/link mv: cannot stat '/bin/link': No such file or directory warning: %post(coreutils-8.29-r0.7.aarch64) scriptlet failed, exit status 1 Seth -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] coreutils postinstall warning
2018-08-20 15:16 GMT+02:00 Seth Bollinger : > We've been seeing the following warning for a while now. Is this expected? > > WARNING: manuf-image-1.0-r0 do_rootfs: Intentionally failing postinstall > scriptlets of ['coreutils'] to defer them to first boot is deprecated. > Please place them into pkg_postinst_ontarget_${PN} (). > > From what I can see, it's being caused by update-alternatives. Is there a > workaround for this? You need to investigate further, specifically why the postinst scriptlet is failing. Usually log.do_rootfs should give a hint. Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] coreutils postinstall warning
Hello All, We've been seeing the following warning for a while now. Is this expected? WARNING: manuf-image-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['coreutils'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} (). >From what I can see, it's being caused by update-alternatives. Is there a workaround for this? Thanks, Seth -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto