]> git.seodisparate.com - AnotherAURHelper/commitdiff
Install s/ccache only when needed, note in README
authorStephen Seo <seo.disparate@gmail.com>
Mon, 8 Apr 2024 02:12:13 +0000 (11:12 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Mon, 8 Apr 2024 02:12:13 +0000 (11:12 +0900)
It is better to not preinstall sccache/ccache in the chroot as mentioned
in the README.

README.md
update.py

index eda7fbc513cb479904a0ab670a203a08c30707e3..0849b5a2c4b001cd5fb2467d77418f379d37bfee 100644 (file)
--- a/README.md
+++ b/README.md
@@ -63,6 +63,17 @@ GiB somehow).
 the build will fail if the limit is reached. If set to false, then the build
 will continue even if the limit is reached.
 
+## Soft-lock if `sccache` is preinstalled in chroot
+
+Apparently, some packages automatically use ccache/sccache if it is installed in
+the chroot, and in some cases, causes a soft-lock during a build. It is
+recommended to not have ccache/sccache preinstalled in the chroot and to just
+let the aur-helper-script install it when necessary.
+
+For example, when building `tenacity-git` with sccache preinstalled, the build
+will hang after the final build step. Apparently, killing the running `sccache`
+process stops the soft-lock in this case.
+
 # Setting up the AUR Helper
 
 The AUR Helper requires several things:
@@ -86,7 +97,9 @@ The `python-toml` package is required for the Python script to run.
 
 Use `/usr/bin/mkarchroot` to create your CHROOT in a directory.
 
-    mkarchroot $HOME/mychroot/root base base-devel ccache sccache cmake ninja
+    mkarchroot $HOME/mychroot/root base base-devel cmake ninja
+
+As noted earlier, it is better to NOT preinstall `ccache` and `sccache`.
 
 You must refer to the CHROOT as `$HOME/mychroot` if you used the same name as in
 the previous example.
index 9f2f1c1bec98c22ef4c80ad0afa626506b5337de..f6dd150c21e8a19c2e3a3792fe8f00dc5f75c440 100755 (executable)
--- a/update.py
+++ b/update.py
@@ -1381,6 +1381,10 @@ def update_pkg_list(
             "--holdver",
         ]
         failure = False
+        if "ccache_dir" in pkg_state[pkg]:
+            pkg_state[pkg]["other_deps"].append("ccache")
+        elif "sccache_dir" in pkg_state[pkg]:
+            pkg_state[pkg]["other_deps"].append("sccache")
         for dep in pkg_state[pkg]["other_deps"]:
             prefetch_result = prefetch_dependency(dep, other_state)
             if prefetch_result != "fetched":