Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 515584

Summary: sys-apps/portage: doesn't suggest autounmasking further of || () deps if the first one is USE-masked
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: Core - DependenciesAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal CC: j.habenicht, multilib+disabled
Priority: Normal Keywords: InVCS, PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 155723    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-28 10:24:21 UTC
Consider an ~amd64 ebuild that does:

RDEPEND="
    || (
        sys-libs/zlib[abi_ppc_32(-)]
        sys-libs/zlib[abi_x86_32(-)]
    )
"

If abi_x86_32 dep goes first, --autounmask suggest enabling abi_x86_32 on zlib. If it goes second, portage stops at:

emerge: there are no ebuilds to satisfy "sys-libs/zlib[abi_ppc_32(-)]".
(dependency required by "dev-libs/libblah-0::mgorny" [ebuild])
(dependency required by "libblah" [argument])

If abi_x86_32 is already in package.use (or global USE), portage correctly adds zlib rebuild to depgraph.
Comment 1 Alex Xu (Hello71) 2014-11-10 19:42:13 UTC
*** Bug 528836 has been marked as a duplicate of this bug. ***
Comment 2 Zac Medico gentoo-dev 2014-11-10 20:28:00 UTC
So, we need depzapdeps to prefer choices that require enabling of unmasked flags over choices that require enabling of masked flags.
Comment 3 Zac Medico gentoo-dev 2014-11-12 01:58:52 UTC
I have a patch in this branch:

	https://github.com/zmedico/portage/commits/bug_515584

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4778
Comment 4 Zac Medico gentoo-dev 2014-11-18 07:22:52 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/20ff16e8941af389cd1fc80e10aef1a90f3b5aa8
Comment 5 Brian Dolbec gentoo-dev 2014-12-04 05:43:22 UTC
This is in the portage-2.2.15 release.