From ccb059853e6d54378e94884f57620a440df24fa4 Mon Sep 17 00:00:00 2001 From: Mike khiretskiy Date: Thu, 17 Apr 2014 17:45:58 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=BE=D0=B2=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=BE=D0=B5=20=D1=81=D0=BA=D0=B0=D1=87=D0=B8=D0=B2=D0=B0=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=B4=D0=B8=D1=81=D1=82=D1=80=D0=B8=D0=B1?= =?UTF-8?q?=D1=83=D1=82=D0=B8=D0=B2=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Изменено сообещние обновления утилит. --- update/update.py | 15 +++++++++++---- update/utils/cl_update.py | 3 +-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/update/update.py b/update/update.py index ce66dd7..f9b1628 100644 --- a/update/update.py +++ b/update/update.py @@ -16,6 +16,7 @@ import sys from os import path +import os from calculate.lib.utils.tools import AddonError from calculate.lib.utils.colortext.palette import TextState @@ -124,15 +125,21 @@ class Update: if e.addon: self.printWARNING(str(e.addon)) self.printWARNING(str(e)) - self.printWARNING(_("Re-fetch {name} repository" - ).format(name=repname)) + self.printWARNING( + _("Re-fetch {name} repository").format(name=repname)) try: + rpath_new = "%s_new" % rpath + self._syncRepository(repname, url, rpath_new, revision, + branch) removeDir(rpath) - except OSError as e: + os.rename(rpath_new, rpath) + except OSError: raise UpdateError(_("Permission denied to change " "{repname} repository").format( repname=repname)) - self._syncRepository(repname, url, rpath, revision, branch) + else: + if not self._syncRepository(repname, url, rpath, revision, branch): + return "skip" return True def syncLaymanRepository(self, repname): diff --git a/update/utils/cl_update.py b/update/utils/cl_update.py index 033a3bd..82d9247 100644 --- a/update/utils/cl_update.py +++ b/update/utils/cl_update.py @@ -133,8 +133,7 @@ class ClUpdateAction(Action): 'group': __("Updating Calculate Utilities"), 'tasks': [ {'name': 'update:update_calculate_pkgs', - 'message': __("Updating {0}").format( - pkg_color("sys-apps/calculate-utilities")), + 'message': __("Calculating dependencies"), 'method': 'Update.emerge("-u","sys-apps/calculate-utilities")', 'condition': need_upgrade('sys-apps/calculate-utilities$') },