|
|
|
@ -33,6 +33,7 @@ from calculate.update.datavars import DataVarsUpdate
|
|
|
|
|
from calculate.update.update_info import UpdateInfo
|
|
|
|
|
from calculate.lib.cl_log import log
|
|
|
|
|
import re
|
|
|
|
|
import shutil
|
|
|
|
|
from collections import MutableSet
|
|
|
|
|
from update_tasks import EmergeMark
|
|
|
|
|
|
|
|
|
@ -310,7 +311,7 @@ class Update(object):
|
|
|
|
|
self._syncRepository(repname, url, rpath_new, revision,
|
|
|
|
|
cb_progress=self.setProgress)
|
|
|
|
|
removeDir(rpath)
|
|
|
|
|
os.rename(rpath_new, rpath)
|
|
|
|
|
shutil.move(rpath_new, rpath)
|
|
|
|
|
except OSError as e:
|
|
|
|
|
raise UpdateError(_("Failed to modify the "
|
|
|
|
|
"{repname} repository").format(
|
|
|
|
@ -349,7 +350,7 @@ class Update(object):
|
|
|
|
|
cachename) + ".stash")
|
|
|
|
|
if path.exists(cachedir_s):
|
|
|
|
|
removeDir(cachedir_s)
|
|
|
|
|
os.rename(cachedir, cachedir_s)
|
|
|
|
|
shutil.move(cachedir, cachedir_s)
|
|
|
|
|
except BaseException as e:
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
@ -378,7 +379,7 @@ class Update(object):
|
|
|
|
|
path.basename(cachename)+".stash")
|
|
|
|
|
if path.exists(cachedir_s):
|
|
|
|
|
try:
|
|
|
|
|
os.rename(cachedir_s, cachedir)
|
|
|
|
|
shutil.move(cachedir_s, cachedir)
|
|
|
|
|
except BaseException as e:
|
|
|
|
|
pass
|
|
|
|
|
else:
|
|
|
|
|