Bug 3191 - Install-conflict message could be a lot more useful
Summary: Install-conflict message could be a lot more useful
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Saul Wold
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-09-28 08:06 UTC by Daniel Stone
Modified: 2012-12-08 03:13 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Stone 2012-09-28 08:06:55 UTC
'WARNING: The recipe is trying to install files into a shared area when those files already exist. Those files are:
   /home/daniels/collabora/yocto/build-i7/tmp/sysroots/x86_64-linux/usr/share/sgml/openjade-1.3.2/catalog'

It'd be really nice if this error message told us exactly which recipe caused the conflicting file to be installed.
Comment 1 Martin Jansa 2012-12-02 17:36:40 UTC
http://git.openembedded.org/openembedded-core/commit/?id=56268f6e4ed1fc11143173bb1717a8be78c728a5

This patch does not seem to work correctly:

Python 2.7.3

>>> sstate_search_cmd = "grep -rl /OE/jansa-test/shr-core/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi/runtime-reverse/vim-common /OE/jansa-test/shr-core/tmp-eglibc/sstate-control --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'"
>>> cmd_array = sstate_search_cmd.split(' ')
>>> search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
grep: |: No such file or directory
grep: sed: No such file or directory

So it never shows any match.
Comment 2 Martin Jansa 2012-12-03 20:27:54 UTC
(In reply to comment #1)
> http://git.openembedded.org/openembedded-core/commit/
> ?id=56268f6e4ed1fc11143173bb1717a8be78c728a5
> 
> This patch does not seem to work correctly:
> 
> Python 2.7.3
> 
> >>> sstate_search_cmd = "grep -rl /OE/jansa-test/shr-core/tmp-eglibc/pkgdata/armv7a-vfp-neon-oe-linux-gnueabi/runtime-reverse/vim-common /OE/jansa-test/shr-core/tmp-eglibc/sstate-control --exclude=master.list | sed -e 's:^.*/::' -e 's:\.populate-sysroot::'"
> >>> cmd_array = sstate_search_cmd.split(' ')
> >>> search_output = subprocess.Popen(cmd_array, stdout=subprocess.PIPE).communicate()[0]
> grep: |: No such file or directory
> grep: sed: No such file or directory
> 
> So it never shows any match.

Adding shell=True makes it work
>>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
>>> print search_output
manifest-armv7a-vfp-neon-gvim.package
manifest-armv7a-vfp-neon-vim-tiny.package
manifest-armv7a-vfp-neon-vim.package

But still isn't 100% reliable, I guess it's caused by some other package being removed from sstate while grep is already running.
>>> search_output = subprocess.Popen(sstate_search_cmd, shell=True, stdout=subprocess.PIPE).communicate()[0]
grep: /OE/jansa-test/shr-core/tmp-eglibc/sstate-control/manifest-armv7a-vfp-neon-systemtap.package: No such file or directory
Comment 3 Saul Wold 2012-12-03 23:08:13 UTC
There's a patch on the list from Enrico also, but it addresses something a little different.

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/031850.html

It's been pending for sometime, I will push RP on this patch

I am testing with your suggestion
Comment 4 Martin Jansa 2012-12-03 23:20:10 UTC
(In reply to comment #3)
> There's a patch on the list from Enrico also, but it addresses something a
> little different.
> 
> http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/031850.
> html
> 
> It's been pending for sometime, I will push RP on this patch
> 
> I am testing with your suggestion

I'll send patch tonight
https://github.com/shr-distribution/oe-core/commit/70952dc6fb5cd2bb59d25cc246363ab46b9d5999