Currently it seems that atoms in the package.mask in a repository have global scope. This means that packages in other repositories can be masked as a side effect, meaning that maintainers of the other repositories have to unmask packages they want to keep. It would be better (IMHO!) if contents of package.mask and package.unmask in the repository (for example /var/db/repos/gentoo/profiles/package.mask) only had scope in the current repository. In other words, as though ::gentoo (in my example) has been appended to each entry. Thanks!
Repository-level package.mask does not have global scope, but has effect only in repository which contains this package.mask and in repositories which specify this repository as master repository (by "masters = ..." entry in their metadata/layout.conf). Probably almost all repositories have something like "masters = gentoo" in there.
Thank you for the clarification - my misunderstanding. So we need to change the masters = gentoo line in the layout.conf file. If we don't want gentoo as the master repository, what should we put there instead? Is this documented somewhere? I am obviously happy for this suggestion to be closed - I will mark it as resolved/invalid Many thanks!
Actually, it seems that having masters=gentoo is the only option if access to eclasses etc is required, so perhaps my original suggestion is not so incorrect. (I found the documentation)