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

Синхронизация до тегов выполняется только если включена переменная
cl_update_usetag_set.
parent cba6dfd3fd
commit 84def60ebd

@ -123,7 +123,7 @@ class ClBuilderUpdateAction(Action):
"repository"),
'method': 'Builder.syncRepositories(eachvar,True)',
'condition': lambda Get: (
Get('cl_builder_binary_set') == "on" and
Get('cl_builder_usetag_set') == "on" and
not Get('update.cl_update_binhost_data')[0])
},
# обновление переменных информации из binhost
@ -132,13 +132,13 @@ class ClBuilderUpdateAction(Action):
'Builder.invalidateVariables('
'"cl_builder_linux_datavars")',
'condition': lambda Get: (
Get('cl_builder_binary_set') == "on" and
Get('cl_builder_usetag_set') == "on" and
not Get('update.cl_update_binhost_data')[0])
},
{'name': 'binhost_unavailable',
'error': __("Update server is unavailable"),
'condition': lambda Get: (
Get('cl_builder_binary_set') == "on" and
Get('cl_builder_usetag_set') == "on" and
not Get('update.cl_update_binhost_data')[0])
},
{'name': 'sync_reps',
@ -150,7 +150,7 @@ class ClBuilderUpdateAction(Action):
{'name': 'check_binhost',
'method': 'Builder.check_binhost(True)',
'condition': lambda Get: Get(
'cl_builder_binary_set') == "on"
'cl_builder_usetag_set') == "on"
},
{'name': 'update_layman',
'message': __("Updating layman cache"),
@ -380,7 +380,7 @@ class ClBuilderUpdateAction(Action):
'message': __("Cleaning the binary repository"),
'method': 'Builder.binaryCleaning()',
'condition': lambda Get: Get(
'cl_builder_binary_set') == "off"
'cl_builder_usetag_set') == "off"
},
],
'depend': Tasks.has("update_other")

@ -1307,7 +1307,7 @@ class VariableClBuilderBranchName(Variable):
def get(self):
dv = self.Get('cl_builder_linux_datavars')
if dv:
if "getbinpkg" in dv.Get('cl_features'):
if dv.GetBool('cl_update_usetag_set'):
return [Git.Reference.Tag for x in dv.Get('cl_update_rep_name')]
else:
branch = dv.Get('cl_update_branch')

@ -76,6 +76,7 @@ class DataVarsBuilderLinux(linux.LinuxDataVars):
env.VariableClEnvData(),
env.VariableClEnvPath(),
env.VariableClEbuildPhase(),
update.VariableClUpdateUsetagSet(section="update"),
update.VariableClUpdateWithBdepsSet(section="update"),
update.VariableClUpdateRepData(section="update"),
update.VariableClUpdateRepPath(section="update"),
@ -151,6 +152,18 @@ class VariableClBuilderBinarySet(ReadonlyVariable):
return "off"
class VariableClBuilderUsetagSet(ReadonlyVariable):
"""
Собираемый дистрибутив использует тэги при синхронизации репозиториев
"""
def get(self):
dv = self.Get('cl_builder_linux_datavars')
if dv:
return dv.Get('cl_update_usetag_set')
return "off"
class VariableClBuilderLinuxDatavars(ReadonlyVariable):
"""
Переменные дистрибутива

Loading…
Cancel
Save