diff --git a/pym/update/update.py b/pym/update/update.py index 1cb90b6..febfe14 100644 --- a/pym/update/update.py +++ b/pym/update/update.py @@ -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), diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index e9566a9..5107483 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -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