diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-06-23 11:07:16 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-06-23 11:07:16 +0000 |
commit | 7cd90408efd0ccf9727037233dfa1266f57d48d2 (patch) | |
tree | 331d374f355055b1705cd734774d06978085df5e /pym/portage.py | |
parent | d3961545106423725863532abcd07ab9c573893c (diff) | |
download | portage-7cd90408efd0ccf9727037233dfa1266f57d48d2.tar.gz portage-7cd90408efd0ccf9727037233dfa1266f57d48d2.tar.bz2 portage-7cd90408efd0ccf9727037233dfa1266f57d48d2.zip |
For bug #182964, replace os.rename() with shutil.move() in order to handle EXDEV errors that are triggered by layered filesystems. (trunk r6967)
svn path=/main/branches/2.1.2/; revision=6968
Diffstat (limited to 'pym/portage.py')
-rw-r--r-- | pym/portage.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pym/portage.py b/pym/portage.py index d2f2cb027..1f6ef39c0 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5264,16 +5264,16 @@ class vardbapi(dbapi): if os.path.exists(newpath): #dest already exists; keep this puppy where it is. continue - os.rename(origpath, newpath) + shutil.move(origpath, newpath) # We need to rename the ebuild now. old_pf = catsplit(mycpv)[1] new_pf = catsplit(mynewcpv)[1] if new_pf != old_pf: try: - os.rename(os.path.join(newpath, old_pf + ".ebuild"), + shutil.move(os.path.join(newpath, old_pf + ".ebuild"), os.path.join(newpath, new_pf + ".ebuild")) - except OSError, e: + except EnvironmentError, e: if e.errno != errno.ENOENT: raise del e @@ -6489,7 +6489,7 @@ class binarytree(object): if e.errno != errno.EEXIST: raise del e - os.rename(tbz2path, new_path) + shutil.move(tbz2path, new_path) self._remove_symlink(mycpv) if new_path.split(os.path.sep)[-2] == "All": self._create_symlink(mynewcpv) @@ -6587,7 +6587,7 @@ class binarytree(object): if e.errno != errno.EEXIST: raise del e - os.rename(src_path, os.path.join(self.pkgdir, "All", myfile)) + shutil.move(src_path, os.path.join(self.pkgdir, "All", myfile)) self._create_symlink(cpv) self._pkg_paths[cpv] = os.path.join("All", myfile) @@ -6605,7 +6605,7 @@ class binarytree(object): if e.errno != errno.EEXIST: raise del e - os.rename(os.path.join(self.pkgdir, "All", myfile), dest_path) + shutil.move(os.path.join(self.pkgdir, "All", myfile), dest_path) self._pkg_paths[cpv] = mypath def populate(self, getbinpkgs=0,getbinpkgsonly=0): @@ -7051,7 +7051,7 @@ class dblink: if x[:-7] != self.pkg: # Clean up after vardbapi.move_ent() breakage in # portage versions before 2.1.2 - os.rename(os.path.join(self.dbdir, x), myebuildpath) + shutil.move(os.path.join(self.dbdir, x), myebuildpath) write_atomic(os.path.join(self.dbdir, "PF"), self.pkg+"\n") break |