Consider an ~amd64 ebuild that does:
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.
*** Bug 528836 has been marked as a duplicate of this bug. ***
So, we need depzapdeps to prefer choices that require enabling of unmasked flags over choices that require enabling of masked flags.
I have a patch in this branch:
I've posted it for review here:
This is in the master branch now:
This is in the portage-2.2.15 release.