[OE-core] coreutils-native and util-linux-native conflicting with meta-micro

Mike Crowe mac at mcrowe.com
Mon Mar 5 09:37:43 UTC 2018


On Monday 05 March 2018 at 16:06:35 +0800, ChenQi wrote:
> On 03/04/2018 05:26 AM, Mike Crowe wrote:
> > I have a recipe which uses both base64 from coreutils-native and hexdump
> > from util-linux-native so I've put both in my recipe DEPENDS.
> > 
> > Unfortunately do_prepare_sysroot is failing with:
> > 
> > Exception: FileExistsError: [Errno 17] File exists: '/home/mac/src/oe2/build-bcm7425/tmp-glibc/sysroots-components/x86_64/coreutils-native/bin/kill' -> '/home/mac/src/oe2/build-bcm7425/tmp-glibc/work/impala-oe-linux-gnueabi/verify-rootfs/1.0-r3/recipe-sysroot-native/bin/kill'
> > 
> > since both coreutils and util-linux provide /bin/kill.
> > 
> > This doesn't cause a problem in a standard oe-core build since coreutils
> > installs all its binaries in ${bindir} whereas util-linux puts kill in
> > ${base_bindir}.
> > 
> > Unfortunately, with meta-micro ${bindir} and ${base_bindir} are the same
> > directory. :(
> > 
> > Both coreutils and util-linux already appear to use the alternatives
> > mechanism for kill, but that doesn't seem to help for -native.
> > 
> > I can easily locally nobble kill in one of the recipes to solve this
> > problem, but that doesn't seem very elegant.
> > 
> > What's the correct way to solve this problem?
> > 
> > Thanks.
> > 
> > Mike.
> 
> I'd suggest you remove conflict items in do_install in case of native. An
> example is in coreutils recipe as below.
> 
> do_install_class-native() {
>     autotools_do_install
>     # remove groups to fix conflict with shadow-native
>     rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
>     # The return is a must since native doesn't need the
>     # do_install_append() in the below.
>     return
> }
> 
> You can create a bbappend file in your layer and do similar things.

Yes, I realise that I can fix this in the recipes locally (although perhaps
"nobble" wasn't the best understood word for me to have used.) I was hoping
to find an acceptable way to fix it upstream, or discover that my recipe
could be changed in a way to avoid the problem entirely.

It seems that in the world of systemd, Linux is gradually moving towards a
single bin directory (albeit /usr/bin with symlink from /bin rather than
the /bin used by meta-micro) so this will probably become a problem in
upstream oe-core at that point anyway. Even without that, it could be
considered confusing to have two different implementations of kill
installed in different directories that appear in the path.

Your suggestion may the right one, if we can agree that for native at
least, kill will be provided by one of coreutils and util-linux only. I'm
just not sure which one. Confusingly, on my Debian box, kill appears to
come from procps.

Thanks.

Mike.



More information about the Openembedded-core mailing list