Browse Source

Исправления работы с other репозиториями

tags/3.2.0_alpha12
Mike Khiretskiy 7 years ago
parent
commit
3afa091567
1 changed files with 13 additions and 12 deletions
  1. +13
    -12
      update/update.py

+ 13
- 12
update/update.py View File

@@ -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)


Loading…
Cancel
Save