During an upgrade using paludis of app-portage/eix from version 0.25.5 to 0.29.3, I experienced the problem, that the /etc/eixrc file should be replaced by a directory (see bug https://bugs.gentoo.org/show_bug.cgi?id=471132#c2). As the paludis guys correctly pointed out (http://paludis.exherbo.org/trac/ticket/1285), the PMS Spec says: "Ebuilds must not attempt to merge a directory on top of any existing file that is not either a directory or a symlink to a directory." Nevertheless, I think the argument given by the eix people is also valid: "It would be just crazy to include such code in every future eix ebuild (and probaly into several other ebuilds) just because one upgrade might need it." In my opinion, the only reasonable way is to change the PMS spec in this point into something that is equivalent to the current portage behaviour (backing up the file and merging the directory). The situation, as it is, is at least not satisfying. Reproducible: Always
(CC-ing eix maintainers) AFAIK the current PMS-compliant solution is to use a strong blocker against old versions, that is '!!<...' against the versions that installed the file. Due to blocker, user would be forced to uninstall the old version before installing the new one. However, the above assumed 'regular' file/directory. I suspect that /etc/eixrc is protected using CONFIG_PROTECT and this probably goes out of the scope of that solution.