I use Portage trunk (605846a0b98869c9d1cbf19660969fb24e5c680b). # cat app-misc/A/A-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="+flag" # cat app-misc/B/B-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="+flag" RDEPEND="app-misc/A[flag=]" # cat app-misc/C/C-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="flag" RDEPEND="app-misc/A[flag=] app-misc/B[flag=]" # cat app-misc/D/D-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" RDEPEND="app-misc/B app-misc/C" # emerge -1 app-misc/B ... # emerge -ptv app-misc/D These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild N ] app-misc/D-0::local 0 KiB [ebuild N ] app-misc/C-0::local USE="-flag" 0 KiB [ebuild R ] app-misc/B-0::local USE="-flag*" 0 KiB [ebuild R ] app-misc/A-0::local USE="-flag*" 0 KiB Total: 4 packages (2 new, 2 reinstalls), 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 app-misc/C-0::local # required by app-misc/D-0::local # required by app-misc/D (argument) >=app-misc/B-0 -flag # required by app-misc/C-0::local # required by app-misc/D-0::local # required by app-misc/D (argument) >=app-misc/A-0 -flag !!! All ebuilds that could satisfy "app-misc/A[flag=]" have been masked. !!! One of the following masked packages is required to complete your request: - app-misc/A-0::local (masked by: ) (dependency required by "app-misc/B-0::local" [ebuild]) (dependency required by "app-misc/C-0::local" [ebuild]) (dependency required by "app-misc/D-0::local" [ebuild]) (dependency required by "app-misc/D" [argument]) For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.
These problems are absent with --autounmask=n. Another situation: Slot conflict with incorrect suggestion about changing of USE flags (especially incorrect for "another_flag" USE flag): # cat app-misc/E/E-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="+flag another_flag" # cat app-misc/F/F-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="+flag another_flag" RDEPEND="app-misc/E[flag=,another_flag=]" # cat app-misc/G/G-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="+flag another_flag" RDEPEND="app-misc/E[flag=,another_flag=] app-misc/F[flag=,another_flag=]" # cat app-misc/H/H-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" IUSE="flag another_flag" RDEPEND="app-misc/E[flag=,another_flag=] app-misc/F[flag=,another_flag=]" # cat app-misc/I/I-0.ebuild EAPI="5" SLOT="0" KEYWORDS="*" RDEPEND="app-misc/G app-misc/H" # emerge -1 app-misc/F ... # emerge -ptv app-misc/I These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild N ] app-misc/I-0::local 0 KiB [ebuild N ] app-misc/H-0::local USE="-another_flag -flag" 0 KiB [ebuild R ] app-misc/F-0::local USE="-another_flag -flag*" 0 KiB [ebuild N ] app-misc/G-0::local USE="flag -another_flag" 0 KiB [nomerge ] app-misc/F-0::local USE="-another_flag -flag*" [ebuild R ] app-misc/E-0::local USE="-another_flag -flag*" 0 KiB Total: 5 packages (3 new, 2 reinstalls), Size of downloads: 0 KiB !!! Multiple package instances within a single package slot have been pulled !!! into the dependency graph, resulting in a slot conflict: app-misc/F:0 (app-misc/F-0:0/0::local, installed) pulled in by app-misc/F[flag=,another_flag=] required by (app-misc/G-0:0/0::local, ebuild scheduled for merge) ^^^^^ (app-misc/F-0:0/0::local, ebuild scheduled for merge) pulled in by app-misc/F[flag=,another_flag=] required by (app-misc/H-0:0/0::local, ebuild scheduled for merge) ^^^^^ app-misc/E:0 (app-misc/E-0:0/0::local, installed) pulled in by app-misc/E[flag=,another_flag=] required by (app-misc/G-0:0/0::local, ebuild scheduled for merge) ^^^^^ app-misc/E[flag=,another_flag=] required by (app-misc/F-0:0/0::local, installed) ^^^^^ (app-misc/E-0:0/0::local, ebuild scheduled for merge) pulled in by app-misc/E[flag=,another_flag=] required by (app-misc/H-0:0/0::local, ebuild scheduled for merge) ^^^^^ app-misc/E[flag=,another_flag=] required by (app-misc/F-0:0/0::local, ebuild scheduled for merge) ^^^^^ It might be possible to solve these slot collisions by applying one of the following solutions: - app-misc/F-0 (Change USE: +another_flag +flag) - app-misc/G-0 (Change USE: +another_flag) - app-misc/E-0 (Change USE: +another_flag +flag) - app-misc/F-0 (Change USE: +another_flag) - app-misc/H-0 (Change USE: +another_flag +flag) The following USE changes are necessary to proceed: (see "package.use" in the portage(5) man page for more details) # required by app-misc/H-0::local # required by app-misc/I-0::local # required by app-misc/I (argument) >=app-misc/F-0 -flag # required by app-misc/F-0::local # required by app-misc/H-0::local # required by app-misc/I-0::local # required by app-misc/I (argument) >=app-misc/E-0 -flag !!! All ebuilds that could satisfy "app-misc/E[flag=,another_flag=]" have been masked. !!! One of the following masked packages is required to complete your request: - app-misc/E-0::local (masked by: ) (dependency required by "app-misc/F-0::local" [ebuild]) (dependency required by "app-misc/H-0::local" [ebuild]) (dependency required by "app-misc/I-0::local" [ebuild]) (dependency required by "app-misc/I" [argument]) For more information, see the MASKED PACKAGES section in the emerge man page or refer to the Gentoo Handbook.