Allow "going back" for "skip...up_to_date" pkgs
This commit is contained in:
parent
882096b8c6
commit
c7b803c1ff
1 changed files with 12 additions and 5 deletions
17
update.py
17
update.py
|
@ -1200,12 +1200,15 @@ if __name__ == "__main__":
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
pkg_list = [temp_pkg_name for temp_pkg_name in pkg_state.keys()]
|
pkg_list = [temp_pkg_name for temp_pkg_name in pkg_state.keys()]
|
||||||
i = 0
|
i = 0
|
||||||
|
furthest_checked = 0
|
||||||
|
going_back = False
|
||||||
while i < len(pkg_list):
|
while i < len(pkg_list):
|
||||||
going_back = False
|
if i > furthest_checked:
|
||||||
|
furthest_checked = i
|
||||||
|
print(f"i is {i} and furthest_checked is {furthest_checked}")
|
||||||
if not ensure_pkg_dir_exists(pkg_list[i], pkg_state, other_state):
|
if not ensure_pkg_dir_exists(pkg_list[i], pkg_state, other_state):
|
||||||
print_state_info_and_get_update_list(pkg_state)
|
print_state_info_and_get_update_list(pkg_state)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
skip = False
|
|
||||||
if (
|
if (
|
||||||
"repo_path" not in pkg_state[pkg_list[i]]
|
"repo_path" not in pkg_state[pkg_list[i]]
|
||||||
or pkg_state[pkg_list[i]]["repo_path"] != "NO_REPO"
|
or pkg_state[pkg_list[i]]["repo_path"] != "NO_REPO"
|
||||||
|
@ -1226,7 +1229,7 @@ if __name__ == "__main__":
|
||||||
log_print('Failed to update pkg dir for "{}"', pkg_list[i])
|
log_print('Failed to update pkg dir for "{}"', pkg_list[i])
|
||||||
print_state_info_and_get_update_list(pkg_state)
|
print_state_info_and_get_update_list(pkg_state)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if skip_on_same_ver:
|
if skip_on_same_ver and i >= furthest_checked:
|
||||||
check_pkg_version_result = check_pkg_version(
|
check_pkg_version_result = check_pkg_version(
|
||||||
pkg_list[i], pkg_state, other_state["repo"], True, other_state
|
pkg_list[i], pkg_state, other_state["repo"], True, other_state
|
||||||
)
|
)
|
||||||
|
@ -1258,7 +1261,11 @@ if __name__ == "__main__":
|
||||||
print_state_info_and_get_update_list(pkg_state)
|
print_state_info_and_get_update_list(pkg_state)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
while True:
|
while True:
|
||||||
if skip_on_same_ver and check_pkg_version_result is not None:
|
if (
|
||||||
|
skip_on_same_ver
|
||||||
|
and check_pkg_version_result is not None
|
||||||
|
and i >= furthest_checked
|
||||||
|
):
|
||||||
state_result = check_pkg_version_result
|
state_result = check_pkg_version_result
|
||||||
else:
|
else:
|
||||||
state_result = check_pkg_version(
|
state_result = check_pkg_version(
|
||||||
|
@ -1290,7 +1297,7 @@ if __name__ == "__main__":
|
||||||
print_state_info_and_get_update_list(pkg_state)
|
print_state_info_and_get_update_list(pkg_state)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
if going_back:
|
if going_back:
|
||||||
pass
|
going_back = False
|
||||||
else:
|
else:
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue