projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
def36a6
)
Handle another case where removing a symlink to a directory can be harmful. (trunk...
author
Zac Medico
<zmedico@gentoo.org>
Fri, 15 Jun 2007 20:42:59 +0000
(20:42 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 15 Jun 2007 20:42:59 +0000
(20:42 -0000)
svn path=/main/branches/2.1.2/; revision=6853
pym/portage.py
patch
|
blob
|
history
diff --git
a/pym/portage.py
b/pym/portage.py
index dc8b3d842537a1819841a9446e305cebfe7e4018..31de417f1ac8a93541601da706a6fadc53f2e8d5 100644
(file)
--- a/
pym/portage.py
+++ b/
pym/portage.py
@@
-7189,6
+7189,11
@@
class dblink:
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))