diff options
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 |