Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574688 - sys-apps/portage-2.2.26 packet selection failure with flags.
Summary: sys-apps/portage-2.2.26 packet selection failure with flags.
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-14 12:21 UTC by Nico Baggus
Modified: 2017-12-06 14:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Baggus 2016-02-14 12:21:43 UTC
Portage sees that a reinstall is needed for cairo & harfbuzz missing rsp. X & icu flags.
But later complains about incompatible packages.. while there clearly is a >= requirement. 


# emerge -1 libreoffice
[ebuild  N    ] media-fonts/liberation-fonts-2.00.1-r1 
[ebuild  N    ] dev-util/cppunit-1.13.2-r2 
[ebuild  N    ] sys-devel/ucpp-1.3.4 
[ebuild  N    ] app-text/libexttextcat-3.4.4 
[ebuild  N    ] media-fonts/libertine-5.1.3.20110615 
[ebuild  N    ] sci-libs/suitesparseconfig-4.2.1 
[ebuild  N    ] media-libs/glm-0.9.6.1 
[ebuild  N    ] app-dicts/myspell-en-20081002 
[ebuild  N    ] app-dicts/myspell-nl-2.10g 
[ebuild  N    ] net-misc/npapi-sdk-0.27.2 
[ebuild  N    ] sci-libs/colamd-2.8.0 
[ebuild  N    ] sci-mathematics/lpsolve-5.5.2.0 
[ebuild   R   ] x11-libs/cairo-1.14.2 
[ebuild  N    ] x11-proto/xineramaproto-1.2.1-r1 
[ebuild  N    ] app-eselect/eselect-opengl-1.3.1-r4 
[ebuild  N    ] x11-proto/xf86vidmodeproto-2.3.1-r1 
[ebuild  N    ] dev-libs/libatomic_ops-7.4.2 
[ebuild  N    ] app-crypt/mhash-0.9.9.9-r1 
[ebuild  N    ] x11-libs/libxshmfence-1.2 
[ebuild  N    ] x11-proto/dri2proto-2.8-r1 
[ebuild  N    ] app-eselect/eselect-mesa-0.0.10 
[ebuild  N    ] x11-proto/dri3proto-1.0 
[ebuild  N    ] x11-proto/presentproto-1.0 
[ebuild  N    ] sys-devel/llvm-3.5.0 
[ebuild  N    ] x11-libs/libdrm-2.4.65 
[ebuild  N    ] x11-proto/xf86driproto-2.1.1-r1 
[ebuild  N    ] x11-proto/damageproto-1.2.1-r1 
[ebuild  N    ] dev-libs/librevenge-0.0.2 
[ebuild  N    ] dev-util/mdds-0.12.1 
[ebuild   R   ] media-libs/harfbuzz-0.9.41 
[ebuild  N    ] x11-libs/libXinerama-1.1.3 
[ebuild  N    ] x11-libs/libXdamage-1.1.4-r1 
[ebuild  N    ] x11-libs/libXxf86vm-1.1.4 
[ebuild  N    ] x11-proto/glproto-1.4.17-r1 
[ebuild  N    ] app-text/libwpd-0.10.0-r1 
[ebuild  N    ] app-text/libebook-0.1.2 
[ebuild  N    ] media-libs/libpagemaker-0.0.2 
[ebuild  N    ] app-text/libodfgen-0.1.4 
[ebuild  N    ] media-libs/libvisio-0.1.1 
[ebuild  N    ] app-text/libetonyek-0.1.3 
[ebuild  N    ] app-text/libabw-0.1.1 
[ebuild  N    ] app-text/libmspub-0.1.2 
[ebuild  N    ] app-text/libmwaw-0.3.6 
[ebuild  N    ] dev-libs/libixion-0.9.0 
[ebuild  N    ] app-text/libwps-0.4.2 
[ebuild  N    ] app-text/libwpg-0.3.0 
[ebuild  N    ] dev-libs/liborcus-0.7.1 
[ebuild  N    ] media-libs/raptor-2.0.9 
[ebuild  N    ] dev-cpp/libcmis-0.5.0-r1 
[ebuild  N    ] dev-libs/rasqal-0.9.29 
[ebuild  N    ] media-libs/libcdr-0.1.1 
[ebuild  N    ] media-libs/libfreehand-0.1.1 
[ebuild  N    ] dev-db/mysql-connector-c++-1.1.6 
[ebuild  N    ] dev-libs/redland-1.0.16 
[ebuild  N    ] app-text/hunspell-1.3.3 
[ebuild  N    ] app-text/liblangtag-0.5.6 
[ebuild  N    ] media-libs/mesa-11.0.6 
[ebuild  N    ] virtual/opengl-7.0-r1 
[ebuild  N    ] app-text/mythes-1.2.4 
[ebuild  N    ] dev-libs/hyphen-2.8.8 
[ebuild  N    ] app-office/libreoffice-l10n-5.0.3.2 
[ebuild  N    ] media-libs/glu-9.0.0-r1 
[ebuild  N    ] virtual/glu-9.0-r1 
[ebuild  N    ] media-libs/glew-1.10.0-r2 
[ebuild  N    ] app-office/libreoffice-5.0.3.2 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

x11-libs/cairo:0

  (x11-libs/cairo-1.14.2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=x11-libs/cairo-1.10.0[X] required by (app-office/libreoffice-5.0.3.2:0/0::gentoo, ebuild scheduled for merge)
                            ^                                                                                                                          

  (x11-libs/cairo-1.14.2:0/0::gentoo, installed) pulled in by
    >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] required by (net-analyzer/rrdtool-1.5.5:0/0::gentoo, installed)
                            ^^^                                                                                                                     
    >=x11-libs/cairo-1.1.10[svg] required by (media-gfx/graphviz-2.38.0-r1:0/0::gentoo, installed)
                            ^^^                                                                                                       

media-libs/harfbuzz:0

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, ebuild scheduled for merge) pulled in by
    >=media-libs/harfbuzz-0.9.18:=[icu(+)] required by (app-office/libreoffice-5.0.3.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, installed) pulled in by
    >=media-libs/harfbuzz-0.9.12:=[glib(+),truetype(+),abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                     
    >=media-libs/harfbuzz-0.9.12:0/0.9.18=[glib(+),truetype(+),abi_x86_64(-)] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                              
Also specific build fails:

# emerge -1 cairo harfbuzz
[ebuild   R   ] x11-libs/cairo-1.14.2 
[ebuild   R   ] media-libs/harfbuzz-0.9.41 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

x11-libs/cairo:0

  (x11-libs/cairo-1.14.2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    x11-libs/cairo (Argument)

  (x11-libs/cairo-1.14.2:0/0::gentoo, installed) pulled in by
    >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] required by (net-analyzer/rrdtool-1.5.5:0/0::gentoo, installed)
                            ^^^                                                                                                                     
    >=x11-libs/cairo-1.1.10[svg] required by (media-gfx/graphviz-2.38.0-r1:0/0::gentoo, installed)
                            ^^^                                                                                                       

media-libs/harfbuzz:0

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, ebuild scheduled for merge) pulled in by
    media-libs/harfbuzz (Argument)

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, installed) pulled in by
    >=media-libs/harfbuzz-0.9.12:=[glib(+),truetype(+),abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                     
    >=media-libs/harfbuzz-0.9.12:0/0.9.18=[glib(+),truetype(+),abi_x86_64(-)] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)

In package.use 
First there was a line ...cairo -svg
later followed by a line cairo svg

Maybe a warning about those would be better then mentioning a conflict.
After removing the first cairo builds.

# emerge -1 harfbuzz
[ebuild   R   ] media-libs/harfbuzz-0.9.41 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

media-libs/harfbuzz:0

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, ebuild scheduled for merge) pulled in by
    media-libs/harfbuzz (Argument)

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, installed) pulled in by
    >=media-libs/harfbuzz-0.9.12:=[glib(+),truetype(+),abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                     
    >=media-libs/harfbuzz-0.9.12:0/0.9.18=[glib(+),truetype(+),abi_x86_64(-)] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                                                                                           
[I] media-libs/harfbuzz
     Available versions:  0.9.41(0/0.9.18) ~1.0.6(0/0.9.18) ~1.1.2(0/0.9.18) ~1.1.3(0/0.9.18) **9999(0/0.9.18) {+cairo fontconfig +glib +graphite icu +introspection static-libs test +truetype ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"}
     Installed versions:  0.9.41(12:51:05 AM 01/10/2016)(glib graphite truetype -cairo -fontconfig -icu -introspection -static-libs -test ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
     Homepage:            http://www.freedesktop.org/wiki/Software/HarfBuzz
     Description:         An OpenType text shaping engine


Reproducible: Sometimes

Steps to Reproduce:
I have seen this happen before, but never had it as clear as here.


Expected Results:  
I do expect this to build.

btw. This is an attempt to build libreoffice on a headless server (no X) to aid in viewing & formatting documents for a webserver. So i actually do not need any X.
Comment 1 Zac Medico gentoo-dev 2016-02-14 18:07:44 UTC
Use this command to see how the USE flags will change:

   emerge -pv --nodeps x11-libs/cairo:0 media-libs/harfbuzz:0
Comment 2 Nico Baggus 2016-02-14 19:08:15 UTC
main problem is there were two entries (for both) in portage.use file.

first one that was wrong, 2nd one that was ok. 
Even then this error occurs...
Removing the first one causes the build to succeed.

for cairo an entry existed with -X 
and a later one (last line X)

for harfbuzz same issue just about the glib flag.
first a -glib, last entry with glib.

It looks like part of portage uses the last entry
and another part uses the first entry.

So solve this i ran portpeek -s on it to remove unsused entries, converted the portage.use file to only contain entries
like
  group/package flag1
  group/package flag2
  ...
with one flag per line, sort -u this file and remove the above cases for cairo & harfbuzz (and 2 others that were not involved in this build).

I think that maybe portpeek should also warn about conflicting flags.
Comment 3 Zac Medico gentoo-dev 2016-02-14 19:25:26 UTC
(In reply to Nico Baggus from comment #2)
> It looks like part of portage uses the last entry
> and another part uses the first entry.

Atoms that are more specific take precedence of atoms that are less specific, where specificity is measured by the best_match_to_list function:

https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/dep/__init__.py?h=v2.2.27#n2031
Comment 4 Nico Baggus 2016-02-21 11:22:27 UTC
it was:

...
media-libs/harfbuzz -glib
...
x11-libs/cairo -X
...
...
media-libs/harfbuzz glib
x11-libs/cairo X
Comment 5 Zac Medico gentoo-dev 2016-02-21 20:35:51 UTC
(In reply to Nico Baggus from comment #4)
> it was:
> 
> ...
> media-libs/harfbuzz -glib
> ...
> x11-libs/cairo -X
> ...
> ...
> media-libs/harfbuzz glib
> x11-libs/cairo X

When the atoms are identical, later settings override earlier settings. So the above settings would be equivalent to:

media-libs/harfbuzz -glib glib
x11-libs/cairo -X X

And since flags are processed left to right, the final result would be equivalent to:

media-libs/harfbuzz glib
x11-libs/cairo X
Comment 6 Nico Baggus 2016-02-21 21:30:05 UTC
That was my understanding as well...


Except these message were shown:


x11-libs/cairo:0

  (x11-libs/cairo-1.14.2:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=x11-libs/cairo-1.10.0[X] required by (app-office/libreoffice-5.0.3.2:0/0::gentoo, ebuild scheduled for merge)
                            ^                                                                                                                          

  (x11-libs/cairo-1.14.2:0/0::gentoo, installed) pulled in by
    >=x11-libs/cairo-1.10.2[svg,static-libs(+)?] required by (net-analyzer/rrdtool-1.5.5:0/0::gentoo, installed)
                            ^^^                                                                                                                     
    >=x11-libs/cairo-1.1.10[svg] required by (media-gfx/graphviz-2.38.0-r1:0/0::gentoo, installed)
                            ^^^                                                                                                       

media-libs/harfbuzz:0

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, ebuild scheduled for merge) pulled in by
    >=media-libs/harfbuzz-0.9.18:=[icu(+)] required by (app-office/libreoffice-5.0.3.2:0/0::gentoo, ebuild scheduled for merge)
                                                                                                                                                

  (media-libs/harfbuzz-0.9.41:0/0.9.18::gentoo, installed) pulled in by
    >=media-libs/harfbuzz-0.9.12:=[glib(+),truetype(+),abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)
                                                                                                                                                                                                                                                                                                     
    >=media-libs/harfbuzz-0.9.12:0/0.9.18=[glib(+),truetype(+),abi_x86_64(-)] required by (x11-libs/pango-1.36.8-r1:0/0::gentoo, installed)


And after i Explicitely removed the first versions of the duplicate lines
like these were the only ones left:

media-libs/harfbuzz glib
x11-libs/cairo X

they would compile.

So it looks like some parts of portage deviate from the logic as you explained and i expected.
Comment 7 Zac Medico gentoo-dev 2016-02-21 21:43:49 UTC
I just tested, and it seems to work correctly:

# echo x11-libs/cairo -X >> /etc/portage/package.use
# emerge -pv --nodeps cairo

These are the packages that would be merged, in order:

[ebuild   R    ] x11-libs/cairo-1.14.2::gentoo  USE="glib opengl svg xcb -X* (-aqua) -debug (-directfb) (-gles2) -static-libs -valgrind -xlib-xcb" ABI_X86="32 (64) (-x32)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
# echo x11-libs/cairo X >> /etc/portage/package.use                                                                                                                                     
# emerge -pv --nodeps cairo                                                                                                                                                             

These are the packages that would be merged, in order:

[ebuild   R    ] x11-libs/cairo-1.14.2::gentoo  USE="X glib opengl svg xcb (-aqua) -debug (-directfb) (-gles2) -static-libs -valgrind -xlib-xcb" ABI_X86="32 (64) (-x32)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
# tail -n2 /etc/portage/package.use                                                                                                                                                     
x11-libs/cairo -X
x11-libs/cairo X
Comment 8 Nico Baggus 2016-02-21 22:08:27 UTC
Note that you added --nodeps ...
It was dependencies that prevented the install. So the difference may be in the depency checking code.
Comment 9 Zac Medico gentoo-dev 2016-02-21 22:13:03 UTC
(In reply to Nico Baggus from comment #8)
> Note that you added --nodeps ...
> It was dependencies that prevented the install. So the difference may be in
> the depency checking code.

Using --nodeps will affect automask behavior with respect to USE flag changes, which may have played a role in what you experienced. However, --nodeps has no effect on that way that package.use settings are evaluated.
Comment 10 Nico Baggus 2017-12-06 14:33:11 UTC
Portage has moved far beyond this version so i'll close it.