|
|
|
@ -246,7 +246,7 @@ class Update(MethodsInterface):
|
|
|
|
|
info_outdated = True
|
|
|
|
|
if info_outdated:
|
|
|
|
|
self.raiseOutdate()
|
|
|
|
|
dv.Set('cl_update_outdate_set', 'on', force=True)
|
|
|
|
|
# dv.Set('cl_update_outdate_set', 'on', force=True)
|
|
|
|
|
finally:
|
|
|
|
|
self.unstash_cache(rpath, name)
|
|
|
|
|
# TODO: debug1
|
|
|
|
@ -1623,6 +1623,16 @@ class Update(MethodsInterface):
|
|
|
|
|
return None
|
|
|
|
|
return level - int(self.clVars.Get("update.cl_update_level"))
|
|
|
|
|
|
|
|
|
|
def check_if_no_branch_is_set(self):
|
|
|
|
|
#basically, if any of the branches are specified, we won't use migration
|
|
|
|
|
return any(x != "tag" for x in self.clVars.Get("cl_update_branch_name"))
|
|
|
|
|
|
|
|
|
|
def turn_off_migration_if_needed(self):
|
|
|
|
|
check = self.check_if_no_branch_is_set()
|
|
|
|
|
if check:
|
|
|
|
|
self.clVars.Set("cl_check_update_level", Variable.Off)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def check_current_binhost(self, binhost_url):
|
|
|
|
|
"""
|
|
|
|
@ -1826,6 +1836,24 @@ class Update(MethodsInterface):
|
|
|
|
|
self.printWARNING(str(e))
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
# #TODO rename
|
|
|
|
|
# def action_to_do_when_migr_is_set(self):
|
|
|
|
|
# print("DEBUG")
|
|
|
|
|
# dv = self.clVars
|
|
|
|
|
# git = self.getGit()
|
|
|
|
|
# repname = "calculate"#TODO check if there's a var for this
|
|
|
|
|
# url, rpath, revision = (
|
|
|
|
|
# dv.Select(["cl_update_rep_url", "cl_update_rep_path",
|
|
|
|
|
# "cl_update_rep_rev"],
|
|
|
|
|
# where="cl_update_rep_name", eq=repname, limit=1))
|
|
|
|
|
# ref_type = git.reference_type(rpath, revision)
|
|
|
|
|
# tag_cr = git.getCommit(rpath, revision)
|
|
|
|
|
# cr = git.getCurrentCommit(rpath)
|
|
|
|
|
# if ref_type == Git.Reference.Branch:
|
|
|
|
|
# pass #TODO
|
|
|
|
|
|
|
|
|
|
# return True
|
|
|
|
|
|
|
|
|
|
def save_portage_state_hash(self):
|
|
|
|
|
"""
|
|
|
|
|
Сохранить состояние
|
|
|
|
@ -1885,7 +1913,6 @@ class Update(MethodsInterface):
|
|
|
|
|
# isdigit - True if it can be interp-ed as a number >=0
|
|
|
|
|
return self.clVars.Get('cl_update_level').isdigit()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def pull_level_from_binhost(self, binhost):
|
|
|
|
|
self._set_update_level(binhost.level)
|
|
|
|
|
return True
|
|
|
|
|