[yocto] Transaction check error building core-image-mono with pyro

Alex J Lennon ajlennon at dynamicdevices.co.uk
Sun Jun 4 14:17:31 PDT 2017


On 01/06/2017 15:57, Alex J Lennon wrote:
> Hi,
>
> I'm updating the meta-mono layer with support to build the test
> core-image-mono image under pyro (fine with morty).
>
> It's getting to the point where it starts to create the root
> file-system image then fails with a transaction check error:
>
> ...
>
> Running transaction check
> Transaction check succeeded.
> Running transaction test
> Error: Transaction check error:
>   file /usr/lib/mono conflicts between attempted installs of
> gtk-sharp-2.12.21-r0.i586 and mono-libs-4.5-5.0.1.1-r0.i586
>   file /usr/lib/mono/gac conflicts between attempted installs of
> gtk-sharp-2.12.21-r0.i586 and mono-gac-5.0.1.1-r0.i586
>
> Error Summary
> -------------
> ...
>
>
> This seems to be suggesting that /usr/lib/mono and /usr/lib/mono/gac
> are files, although they are directories.
>
> I had a look in the logs and the RPMs for gtk-sharp-...
> mono-libs-4.5-... and mono-gac-... but I can't see any obvious file
> conflicts.
>
> Can anybody enlighten me as to what I'm missing?

I made a certain amount of progress with this. I reached out to Zoltan
Boszormenyi who found a workaround. I'm posting snippets of our email
thread here as use of DIRFILES wasn't obvious to me and it perhaps may
help others encountering this type of thing.

...

 "Haven't Pyro replaced the RPM 5.x version with the more Fedora /  Red
Hat / SuSE compatible 4.1x?

I vaguely remember that ownership of identical directories are not 
allowed in two different RPM packages, it would be a problem on  Fedora,
too.

RPM specfiles in Fedora can list empty directories with the %{dir} 
directive (this is what different *filesystem* packages are for in 
Fedora and RHEL/CentOS) but as far as I can see the Bitbake FILES_* 
directives don't make a difference between file patterns and directories.

In Yocto, I only have experience with packaging IPKs. They list all  the
parent directories of a file, too. E.g. for something like this:

FILES_${PN} += "${libdir}/package/somefile.bin"

the resulting IPK will contains these:

./usr
./usr/lib
./usr/lib/package
./usr/lib/package/somefile.bin

When you specify file patterns in an RPM specfile, the resulting RPM
will  only contain the last one, i.e. the file with the full path. Only
this  file will be owned by the RPM. Installing relies on the fact that
the  whole path will be created anyway.

The installation conflict may come from RPM being stricter about
directory  ownership and two packages can only list the same directories
if both  the permissions and the creation date are the same. The latter
would be  identical for two sub-packages of the same recipe but
different for  different packages.

The problem seems to be inherent to how Bitbake creates the list of
packaged files. "

...

"The question is: how can we convince Bitbake to avoid adding
parent directories explicitly into the packages?

I think this is what you need to be aware of (it took me about an hour
to find it):

https://github.com/openembedded/openembedded-core/commit/0e33d232916125ba5305ced7200cc00f8b5f7b22


Presumably, setting DIRFILES="" for gtk-sharp would fix the conflict. "

...

Setting DIRFILES does fix the core-image-mono build for me but I suspect
there's a deeper underlying problem as otherwise many recipes would
surely require this (e.g. just to make use of /etc)

Alex



More information about the yocto mailing list