There should be a feature in portage to control the installation of packages from overlays. Reproducible: Always Hopefully this bug hasn't been reported before, I did look and such so I'm pretty sure it hasn't. Anyway. One problem I have with portage is the fact that if you don't want to install a package from the portage repo, then that's hard if you selectively have that package unmasked, but you don't want the overlay version. Wouldn't it be easier if portage could manage overlays more efficiently with a switch of some sort? I've thought of a few possibilities to make managing overlays easier. One of which, could be a special flag for packages in a overlay, so that you would need to selectively add each package you want to install to a list, or just have a switch to allow overlays to override all official packages. You could also do the same without a special flag.
Since portage-2.1.10 you can add repo atoms to the world file in order to set these kinds of preferences. For example: emerge --noreplace sys-apps/dbus::gentoo That will for updates to pull dbus from the gentoo repo. You can also use repo atoms to mask package. For example, put "sys-apps/dbus::gnome" in /etc/portage/package.mask, in order to mask dbus from the gnome overlay.
(In reply to comment #1) > Since portage-2.1.10 you can add repo atoms to the world file in order to set > these kinds of preferences. As it is, this feature is pretty usable. However, we could improve my making the dependency graph account for these kinds of world atoms in more cases (when @world is not explicitly pulled into the graph).
(In reply to comment #2) > (In reply to comment #1) > > Since portage-2.1.10 you can add repo atoms to the world file in order to set > > these kinds of preferences. > > As it is, this feature is pretty usable. However, we could improve my making > the dependency graph account for these kinds of world atoms in more cases (when > @world is not explicitly pulled into the graph). I'd say these small tweaks should get their own bugs, otherwise they get lost in the too general "repo support" bugs.