All of lore.kernel.org
 help / color / mirror / Atom feed
* coreutils postinstall warning
@ 2018-08-20 13:16 Seth Bollinger
  2018-08-20 13:31 ` Alexander Kanavin
  2018-09-14 12:38 ` Seth Bollinger
  0 siblings, 2 replies; 5+ messages in thread
From: Seth Bollinger @ 2018-08-20 13:16 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 579 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: coreutils postinstall warning
  2018-08-20 13:16 coreutils postinstall warning Seth Bollinger
@ 2018-08-20 13:31 ` Alexander Kanavin
  2018-08-20 13:41   ` Seth Bollinger
  2018-09-14 12:38 ` Seth Bollinger
  1 sibling, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2018-08-20 13:31 UTC (permalink / raw)
  To: Seth Bollinger; +Cc: Yocto discussion list

2018-08-20 15:16 GMT+02:00 Seth Bollinger <seth.boll@gmail.com>:
> 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: coreutils postinstall warning
  2018-08-20 13:31 ` Alexander Kanavin
@ 2018-08-20 13:41   ` Seth Bollinger
  0 siblings, 0 replies; 5+ messages in thread
From: Seth Bollinger @ 2018-08-20 13:41 UTC (permalink / raw)
  To: alex.kanavin; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

On Mon, Aug 20, 2018 at 8:31 AM Alexander Kanavin <alex.kanavin@gmail.com>
wrote:

> 2018-08-20 15:16 GMT+02:00 Seth Bollinger <seth.boll@gmail.com>:
> > 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

[-- Attachment #2: Type: text/html, Size: 1507 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: coreutils postinstall warning
  2018-08-20 13:16 coreutils postinstall warning Seth Bollinger
  2018-08-20 13:31 ` Alexander Kanavin
@ 2018-09-14 12:38 ` Seth Bollinger
  2018-09-14 12:51   ` Martin Jansa
  1 sibling, 1 reply; 5+ messages in thread
From: Seth Bollinger @ 2018-09-14 12:38 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

On Mon, Aug 20, 2018 at 8:16 AM Seth Bollinger <seth.boll@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).

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

[-- Attachment #2: Type: text/html, Size: 1921 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: coreutils postinstall warning
  2018-09-14 12:38 ` Seth Bollinger
@ 2018-09-14 12:51   ` Martin Jansa
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2018-09-14 12:51 UTC (permalink / raw)
  To: Seth Bollinger; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]

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@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
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.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-14 12:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 13:16 coreutils postinstall warning Seth Bollinger
2018-08-20 13:31 ` Alexander Kanavin
2018-08-20 13:41   ` Seth Bollinger
2018-09-14 12:38 ` Seth Bollinger
2018-09-14 12:51   ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.