Hi... It looks like portage doesn't handle fifos correct, attach a .ebuild with a simple mkfifo creation. First time I do an emerge test I get this: >>> Merging net-print/test-1.0 to / --- /var/ >>> /var/test/ >>> /var/test/testfifo If I do an emerge test again right after I get this >>> Merging net-print/test-1.0 to / --- /var/ --- /var/test/ !!! /var/test/testfifo >>> Safely unmerging already-installed instance... <<< fif /var/test/testfifo <<< dir /var/test --- !empty dir /var >>> Original instance of package unmerged safely. The fifo /var/test/testfifo is removed and if I do it a third time it works again as in the first ouput. There is an workaround for this to use an ugly hack in pkg_postinst and pkg_prerm but this way there will be files left when unmerge and isn't a good solution. Heard that there are some packages that use this kind of hack.
Created attachment 88770 [details] An ebuild to show the problem
Created attachment 88771 [details] emerge --info
If the destination file doesn't exist, the fifo is correctly installed. The merge logic doesn't even attempt to install the fifo if the destination file already exists. Then, during the unmerge phase, the previously existing distination file is removed because it's timestamp has not changed since it was installed.
Actually, the fifo mtime is not stored in CONTENTS, so we can't be sure if they belong to another package unless we search through all CONTENTS for all installed packages. In svn r3482 I've changed it so that they will never be unmerged (we already do the same for device files). In the future we should implement global reference counting so that we can simply unmerge files that are no longer owned by any installed packages.
This has been released in 2.1.1_pre1.