Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 635788 - sys-apps/portage-2.3.8 --autounmask-continue doesn't factor for USE= in ENV and creates broken dep graphs
Summary: sys-apps/portage-2.3.8 --autounmask-continue doesn't factor for USE= in ENV a...
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: autounmask
  Show dependency tree
 
Reported: 2017-10-29 13:18 UTC by Kent Fredric (IRC: kent\n)
Modified: 2017-12-14 10:39 UTC (History)
2 users (show)

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


Attachments
more context (more_context.txt,6.66 KB, text/plain)
2017-10-29 13:18 UTC, Kent Fredric (IRC: kent\n)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) gentoo-dev 2017-10-29 13:18:54 UTC
Created attachment 500822 [details]
more context

With:

> USE="perl minimal -egl -opengl -webgl" FEATURES=-test emerge -t1 --quiet-build=y --quiet-repo-display --nospinner --autounmask=y --autounmask-keep-masks=y --autounmask-unrestricted-atoms=n --autounmask-unrestricted-atoms=n --autounmask-continue --unordered-display --verbose --backtrack=10 --onlydeps --with-test-deps=y =net-libs/webkit-gtk-2.18.2

Portage attempts to install webkit-gtk's dependencies as follows:

-----

Calculating dependencies  [nomerge       ] net-libs/webkit-gtk-2.18.2:4/37  USE="(X) geolocation gstreamer introspection jit (-aqua) -coverage -doc -egl -gles2 -gnome-keyring -libnotify -nsplugin -opengl -spell {-test} -wayland -webgl"
[ebuild  N     ]  x11-libs/gtk+-3.22.16:3  USE="X introspection (-aqua) -broadway -cloudprint -colord -cups -examples {-test} -vim-syntax -wayland -xinerama" 0 KiB
[ebuild  N     ]   media-libs/libepoxy-1.4.2  USE="X {-test}" 0 KiB
[ebuild   R    ]    media-libs/mesa-17.0.6  USE="classic dri3 egl* gallium gbm llvm nptl -bindist -d3d9 -debug -gles1 -gles2 -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -vaapi -valgrind -vdpau -vulkan -wayland -xa -xvmc" VIDEO_CARDS="(-freedreno) -i915 -i965 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) (-vivante) -vmware" 0 KiB
[ebuild  N     ]  x11-base/xorg-server-1.19.5:0/1.19.5  USE="glamor ipv6 minimal suid udev xorg xvfb -debug -dmx -doc -kdrive (-libressl) (-selinux) -static-libs -systemd -tslib -unwind -wayland -xcsecurity -xephyr -xnest" 0 KiB

Total: 5 packages (4 new, 1 reinstall), Size of downloads: 0 KiB

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by x11-base/xorg-server-1.19.5::gentoo[glamor]
# required by net-libs/webkit-gtk-2.18.2::gentoo[-test]
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl

Autounmask changes successfully written.
... done!
[nomerge       ] net-libs/webkit-gtk-2.18.2:4/37  USE="(X) geolocation gstreamer introspection jit (-aqua) -coverage -doc -egl -gles2 -gnome-keyring -libnotify -nsplugin -opengl -spell {-test} -wayland -webgl"
[ebuild  N     ]  x11-libs/gtk+-3.22.16:3  USE="X introspection (-aqua) -broadway -cloudprint -colord -cups -examples {-test} -vim-syntax -wayland -xinerama" 0 KiB
[ebuild  N     ]   media-libs/libepoxy-1.4.2  USE="X {-test}" 0 KiB
[ebuild   R    ]    media-libs/mesa-17.0.6  USE="classic dri3 egl* gallium gbm llvm nptl -bindist -d3d9 -debug -gles1 -gles2 -opencl -openmax -osmesa -pax_kernel -pic (-selinux) -vaapi -valgrind -vdpau -vulkan -wayland -xa -xvmc" VIDEO_CARDS="(-freedreno) -i915 -i965 (-imx) -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi (-vc4) (-vivante) -vmware" 0 KiB
[ebuild  N     ]  x11-base/xorg-server-1.19.5:0/1.19.5  USE="glamor ipv6 minimal suid udev xorg xvfb -debug -dmx -doc -kdrive (-libressl) (-selinux) -static-libs -systemd -tslib -unwind -wayland -xcsecurity -xephyr -xnest" 0 KiB

Total: 5 packages (4 new, 1 reinstall), Size of downloads: 0 KiB

----

However, the second of these outputs is NO DIFFERENT from the first, and no matter how many times I do this, portage keeps adding new lines to my autounmask file:

---

# required by media-libs/libepoxy-1.4.2::gentoo
# required by x11-libs/gtk+-3.22.16::gentoo
# required by net-libs/webkit-gtk-2.18.2::gentoo
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl
# required by x11-base/xorg-server-1.19.5::gentoo[glamor]
# required by net-libs/webkit-gtk-2.18.2::gentoo[-test]
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl
# required by x11-base/xorg-server-1.19.5::gentoo[glamor]
# required by net-libs/webkit-gtk-2.18.2::gentoo[-test]
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl
# required by x11-base/xorg-server-1.19.5::gentoo[glamor]
# required by net-libs/webkit-gtk-2.18.2::gentoo[-test]
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl
# required by x11-base/xorg-server-1.19.5::gentoo[glamor]
# required by net-libs/webkit-gtk-2.18.2::gentoo[-test]
# required by =net-libs/webkit-gtk-2.18.2 (argument)
>=media-libs/mesa-17.0.6 egl

---

However, for whatever reason, portage believes the second of these is "fixed", and then proceeds to emerge, only to in fact merge mesa WITHOUT egl:

----

 * Package:    media-libs/mesa-17.0.6
 * Repository: gentoo
 * Maintainer: x11@gentoo.org
 * USE:        abi_x86_64 amd64 classic dri3 elibc_glibc gallium gbm kernel_linux llvm nptl userland_GNU
 * FEATURES:   ccache preserve-libs sandbox userpriv usersandbox

----

and this violates the dependency specification of libepoxy:

----

DEPEND="${PYTHON_DEPS}
        media-libs/mesa[egl,${MULTILIB_USEDEP}]
        x11-misc/util-macros
        X? ( x11-libs/libX11[${MULTILIB_USEDEP}] )"
RDEPEND=""

----

And causes libepoxy to fail compile:

----
checking KHR/khrplatform.h presence... no
checking for KHR/khrplatform.h... no
checking if x86_64-pc-linux-gnu-gcc supports -Wno-int-conversion... yes
checking for EGL... no
configure: error: Package requirements (egl) were not met:

Package egl was not found in the pkg-config search path.
Perhaps you should add the directory containing `egl.pc'
to the PKG_CONFIG_PATH environment variable
Package 'egl', required by 'world', not found

----
Comment 1 Zac Medico gentoo-dev 2017-10-29 20:15:29 UTC
Since USE settings in the environment will always override any package.use changes that --autounmask attempts to create, it's possible to create conflicts like this. I suppose the best --autounmask can to is to detect the conflict and report an error. USE settings in the environment can be treated similarly to use.force and use.mask settings.
Comment 2 Zac Medico gentoo-dev 2017-11-23 02:13:07 UTC
Rather than treat the USE environment like use.force/use.mask, it would be more flexible to convert it to a package.use "*/* ${USE}" setting that autounmask would be able override for specific packages when necessary.
Comment 3 Zac Medico gentoo-dev 2017-11-23 02:21:18 UTC
But package.use "*/* ${USE}" settings do not override settings for specific packages that came earlier in the package.use file(s) (ordered_by_atom_specificity function), so that won't always give the behavior expected for USE environment settings.
Comment 4 Zac Medico gentoo-dev 2017-11-23 02:34:45 UTC
I think what it should do is fold the environment USE settings into generated package.use settings for specific packages when needed, and then delete the USE variable from the environment that when the config is reloaded the generated package.use settings will give the intended result.