]> git.seodisparate.com - AnotherAURHelper/commitdiff
Ensure only one of s/ccache in "other_deps"
authorStephen Seo <seo.disparate@gmail.com>
Mon, 8 Apr 2024 06:19:52 +0000 (15:19 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 8 Apr 2024 06:19:52 +0000 (15:19 +0900)
When sccache/ccache is enabled for a pkg, ensure that "other_deps" for
that package has at most 1 of sccache/ccache.

update.py

index 920835b2c806a364666b8860f665f65898d51ada..7017465becaaee65f59cb8a1234981c5f4f07510 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -1387,9 +1387,11 @@ def update_pkg_list(
         ]
         failure = False
         if "ccache_dir" in pkg_state[pkg]:
-            pkg_state[pkg]["other_deps"].append("ccache")
+            if not "ccache" in pkg_state[pkg]["other_deps"]:
+                pkg_state[pkg]["other_deps"].append("ccache")
         elif "sccache_dir" in pkg_state[pkg]:
-            pkg_state[pkg]["other_deps"].append("sccache")
+            if not "sccache" in pkg_state[pkg]["other_deps"]:
+                pkg_state[pkg]["other_deps"].append("sccache")
         if len(pkg_state[pkg]["other_deps"]) != 0:
             prefetch_result = prefetch_dependencies(
                 pkg_state[pkg]["other_deps"], other_state