From 9f69807513e29e2d2ab050ea396a1adc9a25a63e Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Nov 2022 18:04:00 +0300 Subject: [PATCH] =?UTF-8?q?=09=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=BE:=20=20=20=20=20=20pym/update/update.py=20=09=D0=B8=D0=B7?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=BE:=20=20=20=20=20=20pym/upda?= =?UTF-8?q?te/variables/update.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/update.py | 6 +++--- pym/update/variables/update.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) 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