summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-25 05:29:32 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-25 05:29:32 +0000
commit3a453007c572d4048c8eea7475e6a4c35b6de281 (patch)
tree31be76d35f04ab1ca57a20821897866b68ee1f88 /pym
parente251578f3a9020c4bd4f916f0570e6b7caa7a95c (diff)
downloadportage-3a453007c572d4048c8eea7475e6a4c35b6de281.tar.gz
portage-3a453007c572d4048c8eea7475e6a4c35b6de281.tar.bz2
portage-3a453007c572d4048c8eea7475e6a4c35b6de281.zip
In movefile() FreeBSD chflags handling, use chflags instead of
lchflags when temporarily adjusting the flags on the parent directory since we want to follow any symlinks to the real parent directory. svn path=/main/trunk/; revision=7806
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index d4411a7fc..f9ef92c12 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -4188,9 +4188,11 @@ def movefile(src,dest,newmtime=None,sstat=None,mysettings=None):
if bsd_chflags:
if destexists and dstat.st_flags != 0:
bsd_chflags.lchflags(dest, 0)
+ # Use normal stat/chflags for the parent since we want to
+ # follow any symlinks to the real parent directory.
pflags = os.stat(os.path.dirname(dest)).st_flags
if pflags != 0:
- bsd_chflags.lchflags(os.path.dirname(dest), 0)
+ bsd_chflags.chflags(os.path.dirname(dest), 0)
if destexists:
if stat.S_ISLNK(dstat[stat.ST_MODE]):
@@ -4297,7 +4299,7 @@ def movefile(src,dest,newmtime=None,sstat=None,mysettings=None):
if bsd_chflags:
# Restore the flags we saved before moving
if pflags:
- bsd_chflags.lchflags(os.path.dirname(dest), pflags)
+ bsd_chflags.chflags(os.path.dirname(dest), pflags)
return newmtime