Browse Source

Исправление calculate-update

tags/3.2.2_beta1
Mike Khiretskiy 6 years ago
parent
commit
1cdfca920d
3 changed files with 18 additions and 39 deletions
  1. +6
    -28
      update/utils/cl_update.py
  2. +11
    -10
      update/variables/update.py
  3. +1
    -1
      update/wsdl_update.py

+ 6
- 28
update/utils/cl_update.py View File

@@ -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': [


+ 11
- 10
update/variables/update.py View File

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


+ 1
- 1
update/wsdl_update.py View File

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


Loading…
Cancel
Save