(Sorry if this is a dupe, i looked...honest =P ) In this situation: %% sudo emerge -av postfix These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ] net-mail/mailwrapper-0.2.1 0 kB [ebuild N ] mail-mta/postfix-2.5.5 USE="dovecot-sasl ldap mailwrapper mysql sasl ssl -cdb -hardened -ipv6 -mbox -nis -pam -postgres (-selinux) -vda" 0 kB [blocks B ] mail-mta/exim ("virtual/mta" is blocking mail-mta/exim-4.69) Total: 2 packages (2 new), Size of downloads: 0 kB Conflict: 1 block (1 unsatisfied) * Error: The above package list contains packages which cannot be * installed at the same time on the same system. It would be convienient if portage prompted to unmerge the offender. As in, "blocker $foo exists in the world file, would you like to unmerge this before continuing? (yes/no)" This makes sense because I invoked emerge with -a, so it should ask me. Also, I explicitly called for the mutual blocker to be installed, it didn't get pulled in by something else. Thanks for consideration. ;)
We can fit this calculation into the depgraph _solve_non_slot_operator_slot_conflicts method, since blocker conflicts are very similar to slot conflicts. We can add an --auto-unmask-keep-world [y|n] option, enable --auto-unmask-write for world and world_sets in /var/lib/portage, and add /var/lib/portage to CONFIG_PROTECT.