From 3afa0915676d7cd8edc3289de5a501299b5a42df Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Mon, 21 Jul 2014 17:49:46 +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=B8=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B?= =?UTF-8?q?=20=D1=81=20other=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D1=8F=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/update.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/update/update.py b/update/update.py index 0f15ada..bf34d5e 100644 --- a/update/update.py +++ b/update/update.py @@ -228,18 +228,19 @@ class Update: egenCache = getProgPath('/usr/bin/egencache') if not egenCache: raise UpdateError(_("The Portage tool is not found")) - path_rep = self.clVars.Select('cl_update_rep_path', - where='cl_update_rep_name', - eq=repname, limit=1) - repo_name = readFile( - path.join(path_rep,"profiles/repo_name")).strip() - if repo_name != repname: - self.printWARNING( - _("Repository '{repo_name}' called '{repname}'" - " in cl_update_rep_name").format( - repo_name=repo_name, repname=repname)) - raise UpdateError(_("Failed to update the cache of the {rname} " - "repository").format(rname=repname)) + if repname in self.clVars.Get('cl_update_rep_name'): + path_rep = self.clVars.Select('cl_update_rep_path', + where='cl_update_rep_name', + eq=repname, limit=1) + repo_name = readFile( + path.join(path_rep,"profiles/repo_name")).strip() + if repo_name != repname: + self.printWARNING( + _("Repository '{repo_name}' called '{repname}'" + " in cl_update_rep_name").format( + repo_name=repo_name, repname=repname)) + raise UpdateError(_("Failed to update the cache of the {rname} " + "repository").format(rname=repname)) cpu_num = self.clVars.Get('hr_cpu_num') p = process(egenCache, "--repo=%s" % repname, "--update", "--jobs=%s" % cpu_num, stderr=STDOUT)