emerge: protect symlinks to directories sometimes
authorZac Medico <zmedico@gentoo.org>
Thu, 28 Jul 2011 11:29:25 +0000 (04:29 -0700)
committerZac Medico <zmedico@gentoo.org>
Thu, 28 Jul 2011 11:29:25 +0000 (04:29 -0700)
commit4bb08136f073024c5d31dceb1618b6f4e7246369
tree54ee1f6c5a537afa47bbc9772252b2c9efaae129
parent7bc0f420943278f3efcbb2e33c949c393ab99a09
emerge: protect symlinks to directories sometimes

Before, it was possible to unmerge a symlink to a directory, such that
files installed via the path of the symlink could become inaccessible
via that path (and also making it impossible to unmerge them via that
path).

Now, the symlink will only be unmerged if the directory that it points
to only contains regular files which are all being unmerged. In any
other case, the symlink will be preserved and an eerror log message
will record the event. This will give the user an opportunity to take
further action if they deem it necessary, and such symlink preservation
will not be silent as it was reported in bug #326685, comment #3.
pym/portage/dbapi/vartree.py