Browse Source

Исправлены преводы, исправлено повторное скачивание

tags/3.2.0_alpha10
Mike khiretskiy 7 years ago
parent
commit
af5ce6c595
4 changed files with 20 additions and 11 deletions
  1. +2
    -1
      update/package_tools.py
  2. +13
    -5
      update/update.py
  3. +2
    -2
      update/utils/cl_update.py
  4. +3
    -3
      update/variables/update.py

+ 2
- 1
update/package_tools.py View File

@@ -588,7 +588,8 @@ class PackageInformation:
self.query_packages.append(pkg)

def __getitem__(self, item):
if not self._pkg['CATEGORY/PN'] in self.information_cache:
if not self._pkg['CATEGORY/PN'] in self.information_cache and \
self.query_packages:
self.query_information()
try:
return self.information_cache[self._pkg['CATEGORY/PN']][item]


+ 13
- 5
update/update.py View File

@@ -25,7 +25,6 @@ from calculate.lib.utils.tools import AddonError
from calculate.lib.utils.colortext.palette import TextState
from calculate.lib.utils.colortext import get_color_print
from calculate.update.emerge_parser import RevdepPercentBlock
import pexpect

from package_tools import Git, Layman,\
EmergeLogNamedTask, EmergeLog, GitError, \
@@ -134,7 +133,8 @@ class Update:
"cl_update_rep_rev", "cl_update_branch_name"],
where="cl_update_rep_name", eq=repname, limit=1))
if not url or not rpath:
raise UpdateError(_("Repositories variables is not configured"))
raise UpdateError(_("Variables with repositories settings "
"is not configured"))
self.addProgress()
if clean_on_error:
try:
@@ -160,6 +160,9 @@ class Update:
raise UpdateError(_("Permission denied to change "
"{repname} repository").format(
repname=repname))
finally:
if path.exists(rpath_new):
removeDir(rpath_new)
else:
if not self._syncRepository(repname, url, rpath, revision, branch):
return "skip"
@@ -292,7 +295,9 @@ class Update:
else:
_print = _print.foreground(Colors.GREEN)

self.startTask(_("Emerging%s %s") % (part, _print(str(pkg))))
self.startTask(
_("Emerging{part} {package}").format(part=part,
package=_print(str(pkg))))

def _printInstallPackage(self, pkg, binary=False):
"""
@@ -316,12 +321,15 @@ class Update:
if max_num > 1:
one = _print.foreground(Colors.YELLOW).bold("{0}", num)
two = _print.foreground(Colors.YELLOW).bold("{0}", max_num)
part = " (%s of %s)" % (one, two)
part = _(" ({current} of {maximum})").format(current=one,
maximum=two)
else:
part = ""
_print = _print.foreground(Colors.RED)

self.startTask(_("Unmerging%s %s") % (part, _print.bold(str(pkg))))
self.startTask(
_("Unmerging{part} {package}").format(part=part,
package=_print.bold(str(pkg))))

def emergelike(self, cmd, *params):
"""


+ 2
- 2
update/utils/cl_update.py View File

@@ -205,7 +205,7 @@ class ClUpdateAction(Action):
{'name': 'check_run',
'method': 'Update.checkRun(cl_update_wait_another_set)'},
{'name': 'reps_synchronization',
'group': __("Repository synchronization"),
'group': __("Repositories synchronization"),
'tasks': [
{'name': 'sync_reps',
'foreach': 'cl_update_sync_rep',
@@ -231,7 +231,7 @@ class ClUpdateAction(Action):
},
{'name': 'sync_other_reps:regen_other_cache',
'foreach': 'cl_update_other_rep_name',
'message': __("Updating cache {eachvar:capitalize} repository"),
'message': __("Updating {eachvar:capitalize} repository cache"),
'method': 'Update.regenCache(eachvar)',
'essential': False,
},


+ 3
- 3
update/variables/update.py View File

@@ -185,7 +185,7 @@ class VariableClUpdateBranch(TableVariable):

def init(self):
self.help = _("set branches for repository (REPOSITORY:BRANCH)")
self.label = _("Repository branch")
self.label = _("Repositories branches")

def raiseReadonlyIndexError(self,fieldname="",variablename="",
value=""):
@@ -201,7 +201,7 @@ class VariableClUpdateBranchRep(ReadonlyVariable):
type = "list"

def init(self):
self.label = _("Repository")
self.label = _("Repositories")

def get(self):
return self.Get('cl_update_rep_name')
@@ -214,7 +214,7 @@ class VariableClUpdateBranchName(Variable):
type = "choiceedit-list"

def init(self):
self.label = _("Branch")
self.label = _("Branches")

def choice(self):
return ["master", "develop", "update"]


Loading…
Cancel
Save