summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-10-08 22:23:20 +0000
committerZac Medico <zmedico@gentoo.org>2006-10-08 22:23:20 +0000
commit6797ab6f78db028d72394d528bb0dc458c54066e (patch)
tree8c6205b5eafcd36f990b450d366e0862f97361d1 /pym
parentb3704ce7bd94f3c74b6f7e209dc14834b78118ab (diff)
downloadportage-6797ab6f78db028d72394d528bb0dc458c54066e.tar.gz
portage-6797ab6f78db028d72394d528bb0dc458c54066e.tar.bz2
portage-6797ab6f78db028d72394d528bb0dc458c54066e.zip
Make the .installed invalidation conditional on srcroot and destroot being located on the same filesystem (st_dev).
svn path=/main/trunk/; revision=4623
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 3fd1dc337..1a6aa256d 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6029,15 +6029,16 @@ class dblink:
# This blocks until we can get the dirs to ourselves.
self.lockdb()
- try:
+ if os.stat(srcroot).st_dev == os.stat(destroot).st_dev:
""" The merge process may move files out of the image directory,
which causes invalidation of the .installed flag."""
- os.unlink(os.path.join(
- os.path.dirname(normalize_path(srcroot)), ".installed"))
- except OSError, e:
- if e.errno != errno.ENOENT:
- raise
- del e
+ try:
+ os.unlink(os.path.join(
+ os.path.dirname(normalize_path(srcroot)), ".installed"))
+ except OSError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
otherversions=[]
for v in self.vartree.dbapi.cp_list(self.mysplit[0]):