[yocto] coreutils postinstall warning

Martin Jansa martin.jansa at gmail.com
Fri Sep 14 05:51:59 PDT 2018

On Fri, Sep 14, 2018 at 07:38:49AM -0500, Seth Bollinger wrote:
> On Mon, Aug 20, 2018 at 8:16 AM Seth Bollinger <seth.boll at gmail.com> 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
or setfattr in attr:

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.


> 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 at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180914/0a1a6486/attachment.pgp>

More information about the yocto mailing list