diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-23 10:58:09 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-23 10:58:09 +0000 |
commit | cfe5e7bc23c30dc40b90c1f61282d8f59430840a (patch) | |
tree | 79b41326afb062e1f3c5855917fc2a0dd40b5a13 /pym/emerge/__init__.py | |
parent | 0c93a2b77653ee55957e95b580d457459c4d5ab5 (diff) | |
download | portage-cfe5e7bc23c30dc40b90c1f61282d8f59430840a.tar.gz portage-cfe5e7bc23c30dc40b90c1f61282d8f59430840a.tar.bz2 portage-cfe5e7bc23c30dc40b90c1f61282d8f59430840a.zip |
For bug #182964, replace os.rename() with shutil.move() in order to handle EXDEV errors that are triggered by layered filesystems.
svn path=/main/trunk/; revision=6967
Diffstat (limited to 'pym/emerge/__init__.py')
-rw-r--r-- | pym/emerge/__init__.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 17ff8d58d..ac74f12d2 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -3754,14 +3754,17 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval): icount=0 badcount=0 + import shutil for inforoot in regen_infodirs: if inforoot=='': continue for filename in ("dir", "dir.gz", "dir.bz2"): file_path = os.path.join(inforoot, filename) + if not os.path.exists(file_path): + continue try: - os.rename(file_path, file_path + ".old") - except OSError, e: + shutil.move(file_path, file_path + ".old") + except EnvironmentError, e: if e.errno != errno.ENOENT: raise del e |