When a package to be merged contains a regular file or symlink, and the target file system contains a directory in the same place, then the file or symlink cannot be merged. For files, this produces a lot of noise, starting with For regular files, this scenario will cause the file to be merged with a .backup.#### suffix appended to its name. A corresponding error message is printed. For symlinks, no error message is printed. This lack of any error indication makes bugs like #311923 harder to investigate. I would whish to see at least an error message. As section 13.4 from pms 3 forbids ebuilds to attempt merging symlinks on top of dirs, any such attempt should be considered an error warranting at least inspection by the sys admin. For my sys-apps/portage-2.2_rc67, the code relevant to this behaviour seems to be in file vartree.py, method dblink.mergeme. Thanks to ferringdb for pointing me in the correct direction. That method has code like this: if stat.S_ISLNK(mymode): ... if mydmode!=None: #destination exists if not stat.S_ISLNK(mydmode): if stat.S_ISDIR(mydmode): # directory in the way: we can't merge a symlink over a directory # we won't merge this, continue with next file... continue ... elif stat.S_ISDIR(mymode): ... else: ... if mydmode != None: # destination file exists if stat.S_ISDIR(mydmode): # install of destination is blocked by an # existing directory with the same name newdest = self._new_backup_path(mydest) msg = [] msg.append("") msg.append("Installation of a regular file is blocked by a directory:") msg.append(" '%s'" % mydest) msg.append("This file will be merged with a different name:") msg.append(" '%s'" % newdest) msg.append("") self._eerror("preinst", msg) mydest = newdest It seems that the core of this behaviour, i.e. silent symlinks and noisy regular files when a dir is in the way, have been in portage at least since its import into svn resp. git. As history hasn't been imported, I can't tell more.
*** This bug has been marked as a duplicate of bug 326685 ***