изменено: pym/update/update.py

изменено:      pym/update/variables/update.py
master 3.7.2.33
root 1 year ago
parent 2abe2f904b
commit 9f69807513

@ -572,6 +572,8 @@ class Update(MethodsInterface):
for perc in p.progress():
self.setProgress(perc)
else:
p = process(emerge, "--sync", repname, stderr=STDOUT)
if p.failed():
rpath_old = f"{rpath}_old"
makeDirectory(rpath_old)
for root, dirs, files in os.walk(rpath):
@ -579,15 +581,13 @@ class Update(MethodsInterface):
os.replace(os.path.join(rpath, d), os.path.join(rpath_old, f))
for d in dirs:
shutil.move(os.path.join(rpath, d), os.path.join(rpath_old, d))
p = process(emerge, "--sync", repname, stderr=STDOUT)
if p.failed():
clearDirectory(rpath)
for root, dirs, files in os.walk(rpath_old):
for f in files:
os.replace(os.path.join(rpath_old, d), os.path.join(rpath, f))
for d in dirs:
shutil.move(os.path.join(rpath_old, d), os.path.join(rpath, d))
removeDir(rpath_old)
os.rmdir(rpath_old)
raise UpdateError(
_("Failed to update the {rname} repository").format(
rname=repname),

@ -636,7 +636,6 @@ class VariableClUpdateOtherSet(Variable):
value = ""
def get(self):
if self.Get('cl_update_inner_other_set'):
return self.Get('cl_update_inner_other_set')
return self.value

Loading…
Cancel
Save