projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ee8eaa
)
Handle another case where removing a symlink to a directory can be harmful.
author
Zac Medico
<zmedico@gentoo.org>
Fri, 15 Jun 2007 20:42:32 +0000
(20:42 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 15 Jun 2007 20:42:32 +0000
(20:42 -0000)
svn path=/main/trunk/; revision=6852
pym/portage/dbapi/vartree.py
patch
|
blob
|
history
diff --git
a/pym/portage/dbapi/vartree.py
b/pym/portage/dbapi/vartree.py
index a773f8a50f0dc2a930b510464a813234f7cb067e..5e397f099543b221c2df629731ebd856f6b6d5dd 100644
(file)
--- a/
pym/portage/dbapi/vartree.py
+++ b/
pym/portage/dbapi/vartree.py
@@
-1224,6
+1224,11
@@
class dblink(object):
if not islink:
writemsg_stdout("--- !sym %s %s\n" % ("sym", obj))
continue
+ # Don't unlink symlinks to directories here since that can
+ # remove /lib and /usr/lib symlinks.
+ if statobj and stat.S_ISDIR(statobj.st_mode):
+ writemsg_stdout("--- !sym %s %s\n" % ("sym", obj))
+ continue
try:
os.unlink(obj)
writemsg_stdout("<<< %s %s\n" % ("sym", obj))