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

master3.3 3.2.0_alpha10
Mike khiretskiy 10 years ago
parent e661a22e9d
commit af5ce6c595

@ -588,7 +588,8 @@ class PackageInformation:
self.query_packages.append(pkg) self.query_packages.append(pkg)
def __getitem__(self, item): 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() self.query_information()
try: try:
return self.information_cache[self._pkg['CATEGORY/PN']][item] return self.information_cache[self._pkg['CATEGORY/PN']][item]

@ -25,7 +25,6 @@ from calculate.lib.utils.tools import AddonError
from calculate.lib.utils.colortext.palette import TextState from calculate.lib.utils.colortext.palette import TextState
from calculate.lib.utils.colortext import get_color_print from calculate.lib.utils.colortext import get_color_print
from calculate.update.emerge_parser import RevdepPercentBlock from calculate.update.emerge_parser import RevdepPercentBlock
import pexpect
from package_tools import Git, Layman,\ from package_tools import Git, Layman,\
EmergeLogNamedTask, EmergeLog, GitError, \ EmergeLogNamedTask, EmergeLog, GitError, \
@ -134,7 +133,8 @@ class Update:
"cl_update_rep_rev", "cl_update_branch_name"], "cl_update_rep_rev", "cl_update_branch_name"],
where="cl_update_rep_name", eq=repname, limit=1)) where="cl_update_rep_name", eq=repname, limit=1))
if not url or not rpath: if not url or not rpath:
raise UpdateError(_("Repositories variables is not configured")) raise UpdateError(_("Variables with repositories settings "
"is not configured"))
self.addProgress() self.addProgress()
if clean_on_error: if clean_on_error:
try: try:
@ -160,6 +160,9 @@ class Update:
raise UpdateError(_("Permission denied to change " raise UpdateError(_("Permission denied to change "
"{repname} repository").format( "{repname} repository").format(
repname=repname)) repname=repname))
finally:
if path.exists(rpath_new):
removeDir(rpath_new)
else: else:
if not self._syncRepository(repname, url, rpath, revision, branch): if not self._syncRepository(repname, url, rpath, revision, branch):
return "skip" return "skip"
@ -292,7 +295,9 @@ class Update:
else: else:
_print = _print.foreground(Colors.GREEN) _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): def _printInstallPackage(self, pkg, binary=False):
""" """
@ -316,12 +321,15 @@ class Update:
if max_num > 1: if max_num > 1:
one = _print.foreground(Colors.YELLOW).bold("{0}", num) one = _print.foreground(Colors.YELLOW).bold("{0}", num)
two = _print.foreground(Colors.YELLOW).bold("{0}", max_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: else:
part = "" part = ""
_print = _print.foreground(Colors.RED) _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): def emergelike(self, cmd, *params):
""" """

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

@ -185,7 +185,7 @@ class VariableClUpdateBranch(TableVariable):
def init(self): def init(self):
self.help = _("set branches for repository (REPOSITORY:BRANCH)") self.help = _("set branches for repository (REPOSITORY:BRANCH)")
self.label = _("Repository branch") self.label = _("Repositories branches")
def raiseReadonlyIndexError(self,fieldname="",variablename="", def raiseReadonlyIndexError(self,fieldname="",variablename="",
value=""): value=""):
@ -201,7 +201,7 @@ class VariableClUpdateBranchRep(ReadonlyVariable):
type = "list" type = "list"
def init(self): def init(self):
self.label = _("Repository") self.label = _("Repositories")
def get(self): def get(self):
return self.Get('cl_update_rep_name') return self.Get('cl_update_rep_name')
@ -214,7 +214,7 @@ class VariableClUpdateBranchName(Variable):
type = "choiceedit-list" type = "choiceedit-list"
def init(self): def init(self):
self.label = _("Branch") self.label = _("Branches")
def choice(self): def choice(self):
return ["master", "develop", "update"] return ["master", "develop", "update"]

Loading…
Cancel
Save