From 1cdfca920d793fcc6b52553af6c69ca94855d42c Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Wed, 1 Oct 2014 17:05:33 +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=D0=B5=20calculate-update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/cl_update.py | 34 ++++++---------------------------- update/variables/update.py | 21 +++++++++++---------- update/wsdl_update.py | 2 +- 3 files changed, 18 insertions(+), 39 deletions(-) diff --git a/update/utils/cl_update.py b/update/utils/cl_update.py index 7ed8318..9141722 100644 --- a/update/utils/cl_update.py +++ b/update/utils/cl_update.py @@ -81,26 +81,18 @@ class ClUpdateAction(Action): 'condition': lambda Get: ( Get('cl_update_pretend_set') == 'off' and Get('cl_update_sync_only_set') == 'off') }, - {'name': 'update:update_portage', - 'group': __("Updating Portage"), + {'name': 'update:update_world', + 'group': __("Updating packages"), 'tasks': [ - {'name': 'update:update_portage_pkg', - 'message': __("Updating {0}").format( - pkg_color("sys-apps/portage")), - 'method': 'Update.emerge("-u","portage")', - 'condition': need_upgrade('sys-apps/portage$') - }, + {'name': 'update:update_world', + 'message': __("Calculating dependencies"), + 'method': 'Update.emerge("-uDN","--with-bdeps=y","@world")', + } ] }, {'name': 'update:update_python', 'group': __("Updating Python"), 'tasks': [ - {'name': 'update:update_python_pkg', - 'message': __('Updating {0}').format( - pkg_color('dev-lang/python')), - 'method': 'Update.emerge("-u","dev-lang/python")', - 'condition': need_upgrade('dev-lang/python$') - }, {'name': 'update:python_updater', 'message': __('Find & rebuild packages broken due ' 'to a Python upgrade'), @@ -115,11 +107,6 @@ class ClUpdateAction(Action): {'name': 'update:update_perl', 'group': __("Updating Perl"), 'tasks': [ - {'name': 'update:update_perl_pkg', - 'message': __('Updating {0}').format(pkg_color('dev-lang/perl')), - 'method': 'Update.emerge("-u","dev-lang/perl")', - 'condition': need_upgrade('dev-lang/perl$') - }, {'name': 'update:perl_cleaner', 'message': __('Find & rebuild packages and Perl header files ' 'broken due to a perl upgrade'), @@ -131,15 +118,6 @@ class ClUpdateAction(Action): }, ] }, - {'name': 'update:update_world', - 'group': __("Updating packages"), - 'tasks': [ - {'name': 'update:update_world', - 'message': __("Calculating dependencies"), - 'method': 'Update.emerge("-uDN","--with-bdeps=y","@world")', - } - ] - }, {'name': 'update_other:depclean', 'group': __("Cleaning the system from needless packages"), 'tasks': [ diff --git a/update/variables/update.py b/update/variables/update.py index 8640d60..67f006e 100644 --- a/update/variables/update.py +++ b/update/variables/update.py @@ -57,10 +57,10 @@ class VariableClUpdateWorld(Variable): metavalue = "MODE" def init(self): - self.help = ("'rebuild' - " + _("rebuild package list") + - ",\n'merge' - " + _("append profile package list") + - ",\n'update' - " + _("update package list")) - self.label = _("Package list") + self.help = ("'rebuild' - " + _("rebuild system packages list") + + ",\n'merge' - " + _("append profile system packages list") + + ",\n'update' - " + _("update system packages list")) + self.label = _("System packages list") def choice(self): return [("rebuild", _("Rebuild")), @@ -567,8 +567,9 @@ class VariableClUpdateTemplatesLocate(Variable): def get(self): dv = self.Get('update.cl_update_profile_datavars') if dv: + return dv.Get('cl_template_location') + ['clt'] + else: return self.Get('cl_templates_locate') - return dv.Get('cl_template_location') + ['clt'] def choice(self): return map(lambda x:(x,self.descriptionMap.get(x,_("%s overlay templates")%x)), @@ -940,11 +941,11 @@ class VariableClUpdateProfileSyncSet(Variable): """ type = "bool" value = "off" - opt = ["-s", "--sync"] + opt = ["-u", "--update-cache"] def init(self): - self.label = _("Synchronize the repository") - self.help = _("Synchronize the repository") + self.label = _("Update the cache") + self.help = _("Update the cache") class VariableClUpdateAutocheckSet(Variable): @@ -1000,8 +1001,8 @@ class VariableClUpdateEmergelistSet(Variable): opt = ["-e","--emergelist"] def init(self): - self.label = _("Emerge like package list") - self.help = _("display package list in emerge format") + self.label = _("Emerge like packages list") + self.help = _("display packages list in emerge format") class VariableClUpdateKernelVersion(ReadonlyVariable): """ diff --git a/update/wsdl_update.py b/update/wsdl_update.py index 5808e13..b3cd1b3 100644 --- a/update/wsdl_update.py +++ b/update/wsdl_update.py @@ -71,10 +71,10 @@ class Wsdl(WsdlBase): 'cl_update_sync_rep', 'cl_update_emergelist_set', 'cl_update_world', - 'cl_update_branch', 'cl_update_egencache_force', 'cl_update_eixupdate_force', 'cl_update_wait_another_set', + 'cl_update_branch', 'cl_update_autocheck_schedule_set', 'cl_templates_locate', 'cl_verbose_set', 'cl_dispatch_conf'),