Изменена синхронизация репозиториев

Синхронизация до тегов выполняется только если включена переменная
cl_update_usetag_set.
master-3.5 3.5.6
parent 53669b7f71
commit 572ab1de99

@ -202,14 +202,16 @@ class ClUpdateAction(Action):
'message': 'message':
__("Fallback syncing the {eachvar:capitalize} repository"), __("Fallback syncing the {eachvar:capitalize} repository"),
'method': 'Update.syncRepositories(eachvar,True)', 'method': 'Update.syncRepositories(eachvar,True)',
'condition': lambda Get: ("getbinpkg" in Get('cl_features') and 'condition': lambda Get,GetBool: (
not Get('cl_update_binhost_data')[0]) GetBool('cl_update_usetag_set') and
not Get('cl_update_binhost_data')[0])
}, },
# обновление переменных информации из binhost # обновление переменных информации из binhost
{'name': 'update_binhost_list', {'name': 'update_binhost_list',
'method': 'Update.update_binhost_list()', 'method': 'Update.update_binhost_list()',
'condition': lambda Get: ("getbinpkg" in Get('cl_features') and 'condition': lambda Get,GetBool: (
not Get('cl_update_binhost_data')[0]) GetBool('cl_update_usetag_set') and
not Get('cl_update_binhost_data')[0])
}, },
{'name': 'sync_reps', {'name': 'sync_reps',
'foreach': 'cl_update_sync_rep', 'foreach': 'cl_update_sync_rep',
@ -219,7 +221,7 @@ class ClUpdateAction(Action):
}, },
{'name': 'check_binhost', {'name': 'check_binhost',
'method': 'Update.check_binhost()', 'method': 'Update.check_binhost()',
'condition': lambda Get: "getbinpkg" in Get('cl_features') 'condition': lambda GetBool: GetBool('cl_update_usetag_set')
}, },
{'name': 'sync_other_reps', {'name': 'sync_other_reps',
'foreach': 'cl_update_other_rep_name', 'foreach': 'cl_update_other_rep_name',
@ -285,8 +287,8 @@ class ClUpdateAction(Action):
'method': 'Update.download_packages(cl_update_portage_binhost,' 'method': 'Update.download_packages(cl_update_portage_binhost,'
'cl_update_package_cache)', 'cl_update_package_cache)',
'essential': False, 'essential': False,
'condition': lambda Get: ( 'condition': lambda Get, GetBool: (
"getbinpkg" in Get('cl_features') and GetBool('cl_update_usetag_set') and
Get('cl_update_package_cache') and ( Get('cl_update_package_cache') and (
Get('cl_update_outdate_set') == 'on' or Get('cl_update_outdate_set') == 'on' or
Get('cl_update_package_cache_set') == 'on')) Get('cl_update_package_cache_set') == 'on'))

@ -238,7 +238,8 @@ class VariableClUpdateRepRev(Variable):
class VariableClUpdateBranch(Variable): class VariableClUpdateBranch(Variable):
""" """
Ветка на которую будет обновляться репозиторий если -getbinpkg Ветка на которую будет обновляться репозиторий если
не используется синхронизация по тэгам
""" """
value = Git.Reference.Master value = Git.Reference.Master
@ -449,7 +450,7 @@ class VariableClUpdateBranchName(Variable):
Git.Reference.Update] Git.Reference.Update]
def get(self): def get(self):
if "getbinpkg" in self.Get('cl_features'): if self.GetBool('cl_update_usetag_set'):
return [Git.Reference.Tag for x in self.Get('cl_update_rep_name')] return [Git.Reference.Tag for x in self.Get('cl_update_rep_name')]
else: else:
branch = self.Get('cl_update_branch') branch = self.Get('cl_update_branch')
@ -1334,6 +1335,7 @@ class DataVarsUpdateProfile(SimpleDataVars):
VariableClUpdateRepRev(section="update"), VariableClUpdateRepRev(section="update"),
VariableClUpdateBranch(section="update"), VariableClUpdateBranch(section="update"),
VariableClUpdateBranchName(section="update"), VariableClUpdateBranchName(section="update"),
VariableClUpdateUsetagSet(section="update"),
VariableClUpdateLaymanConfig(section="update"), VariableClUpdateLaymanConfig(section="update"),
VariableClUpdateLaymanStorage(section="update"), VariableClUpdateLaymanStorage(section="update"),
VariableClUpdateRepName(section="update"), VariableClUpdateRepName(section="update"),
@ -1734,15 +1736,15 @@ class VariableClUpdateWithBdepsSet(Variable):
""" """
Добавление --with-bdeps при вызове emerge Добавление --with-bdeps при вызове emerge
""" """
type = "bool" type = Variable.Types.Boolean
value = "off" value = Variable.Off
class VariableClUpdateWithBdepsOptSet(Variable): class VariableClUpdateWithBdepsOptSet(Variable):
""" """
Добавление --with-bdeps при вызове emerge (опция) Добавление --with-bdeps при вызове emerge (опция)
""" """
type = "bool" type = Variable.Types.Boolean
opt = ["--with-bdeps"] opt = ["--with-bdeps"]
def init(self): def init(self):
@ -1757,5 +1759,13 @@ class VariableClUpdateForceDepcleanSet(Variable):
""" """
Принудительный вызов depclean Принудительный вызов depclean
""" """
type = "bool" type = Variable.Types.Boolean
value = "off" value = Variable.Off
class VariableClUpdateUsetagSet(Variable):
"""
Использовать тэги при синхронизации репозиториев
"""
type = Variable.Types.Boolean
value = Variable.On

Loading…
Cancel
Save