summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/bintree.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r--pym/portage/dbapi/bintree.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 3242cc158..1930bc71d 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -10,7 +10,7 @@ from portage.util import normalize_path, writemsg, writemsg_stdout
from portage.versions import best, catpkgsplit, catsplit
from portage.update import update_dbentries
-from portage import listdir, dep_expand
+from portage import dep_expand, listdir, _movefile
import portage.xpak, portage.getbinpkg
@@ -206,7 +206,7 @@ class binarytree(object):
if e.errno != errno.EEXIST:
raise
del e
- os.rename(tbz2path, new_path)
+ _movefile(tbz2path, new_path, mysettings=self.settings)
self._remove_symlink(mycpv)
if new_path.split(os.path.sep)[-2] == "All":
self._create_symlink(mynewcpv)
@@ -299,7 +299,8 @@ class binarytree(object):
if e.errno != errno.EEXIST:
raise
del e
- os.rename(src_path, os.path.join(self.pkgdir, "All", myfile))
+ dest_path = os.path.join(self.pkgdir, "All", myfile)
+ _movefile(src_path, dest_path, mysettings=self.settings)
self._create_symlink(cpv)
self._pkg_paths[cpv] = os.path.join("All", myfile)
@@ -317,7 +318,8 @@ class binarytree(object):
if e.errno != errno.EEXIST:
raise
del e
- os.rename(os.path.join(self.pkgdir, "All", myfile), dest_path)
+ src_path = os.path.join(self.pkgdir, "All", myfile)
+ _movefile(src_path, dest_path, mysettings=self.settings)
self._pkg_paths[cpv] = mypath
def populate(self, getbinpkgs=0, getbinpkgsonly=0):
@@ -681,7 +683,7 @@ class binarytree(object):
pkgindex_lock = lockfile(self._pkgindex_file,
wantnewlockfile=1)
if filename is not None:
- os.rename(filename, self.getname(cpv))
+ _movefile(filename, self.getname(cpv), mysettings=self.settings)
if self._all_directory and \
self.getname(cpv).split(os.path.sep)[-2] == "All":
self._create_symlink(cpv)