From 788ac3d1361c4b338c59d9c6230f1082e6fd9287 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Mon, 3 Mar 2025 13:34:46 +0900 Subject: [PATCH] "auto_check_PKGBUILD" to "hash_compare_PKGBUILD" Renamed option. --- update.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/update.py b/update.py index e69d86f..4e221d3 100755 --- a/update.py +++ b/update.py @@ -545,9 +545,9 @@ def check_pkg_build( pkgdir = os.path.join(other_state["clones_dir"], pkg) - if pkg_state[pkg]["auto_check_PKGBUILD"]: + if pkg_state[pkg]["hash_compare_PKGBUILD"]: log_print( - "Checking PKGBUILD (auto_check_PKGBUILD enabled for this pkg)...", + "Checking PKGBUILD (hash_compare_PKGBUILD enabled for this pkg)...", other_state=other_state, ) try: @@ -558,10 +558,7 @@ def check_pkg_build( capture_output=True, encoding="UTF-8", ) - if ( - result.stdout - == pkg_state[pkg]["auto_check_PKGBUILD_prev_sha256"] - ): + if result.stdout == pkg_state[pkg]["hash_compare_PKGBUILD_hash"]: log_print( "PKGBUILD did not change, continuing...", other_state=other_state, @@ -2305,13 +2302,13 @@ def main(): else: pkg_state[entry["name"]]["skip_branch_up_to_date"] = False if ( - "auto_check_PKGBUILD" in entry - and type(entry["auto_check_PKGBUILD"]) is bool - and entry["auto_check_PKGBUILD"] + "hash_compare_PKGBUILD" in entry + and type(entry["hash_compare_PKGBUILD"]) is bool + and entry["hash_compare_PKGBUILD"] ): - pkg_state[entry["name"]]["auto_check_PKGBUILD"] = True + pkg_state[entry["name"]]["hash_compare_PKGBUILD"] = True else: - pkg_state[entry["name"]]["auto_check_PKGBUILD"] = False + pkg_state[entry["name"]]["hash_compare_PKGBUILD"] = False if ( "only_check_PKGBUILD" in entry and type(entry["only_check_PKGBUILD"]) is bool @@ -2594,7 +2591,7 @@ def main(): capture_output=True, encoding="UTF-8", ) - pkg_state[pkg]["auto_check_PKGBUILD_prev_sha256"] = result.stdout + pkg_state[pkg]["hash_compare_PKGBUILD_hash"] = result.stdout except subprocess.CalledProcessError: log_print( 'WARNING: Failed to get sha256sum of PKGBUILD pkg "{}"!'.format( @@ -2602,7 +2599,7 @@ def main(): ), other_state=other_state, ) - pkg_state[pkg]["auto_check_PKGBUILD_prev_sha256"] = "error" + pkg_state[pkg]["hash_compare_PKGBUILD_hash"] = "error" while i < len(pkg_list): if i > furthest_checked: furthest_checked = i -- 2.49.0