Compare commits

..

No commits in common. "a040785bd67aa2a6caf02412e26fd38f9a0b5a0a" and "d7f5eb1fe5e05b4cf48f40a3b1957d2deb9232b1" have entirely different histories.

2 changed files with 1 additions and 50 deletions

View file

@ -63,17 +63,6 @@ GiB somehow).
the build will fail if the limit is reached. If set to false, then the build the build will fail if the limit is reached. If set to false, then the build
will continue even if the limit is reached. 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 # Setting up the AUR Helper
The AUR Helper requires several things: The AUR Helper requires several things:
@ -97,9 +86,7 @@ The `python-toml` package is required for the Python script to run.
Use `/usr/bin/mkarchroot` to create your CHROOT in a directory. Use `/usr/bin/mkarchroot` to create your CHROOT in a directory.
mkarchroot $HOME/mychroot/root base base-devel cmake ninja mkarchroot $HOME/mychroot/root base base-devel ccache sccache 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 You must refer to the CHROOT as `$HOME/mychroot` if you used the same name as in
the previous example. the previous example.

View file

@ -742,13 +742,6 @@ def get_pkgbuild_version(
f'{os.environ["HOME"]}/.cargo/git:/build/.cargo/git', f'{os.environ["HOME"]}/.cargo/git:/build/.cargo/git',
) )
for dep in pkg_state[pkg]["other_deps"]: for dep in pkg_state[pkg]["other_deps"]:
prefetch_result = prefetch_dependency(dep, other_state)
if prefetch_result != "fetched":
log_print(
'ERROR: Failed to prefetch dep "{}"'.format(dep),
other_state=other_state,
)
return False, None, None, None
dep_fullpath = get_latest_pkg(dep, "/var/cache/pacman/pkg") dep_fullpath = get_latest_pkg(dep, "/var/cache/pacman/pkg")
if not dep_fullpath: if not dep_fullpath:
log_print( log_print(
@ -1381,20 +1374,7 @@ def update_pkg_list(
"--holdver", "--holdver",
] ]
failure = False 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"]: for dep in pkg_state[pkg]["other_deps"]:
prefetch_result = prefetch_dependency(dep, other_state)
if prefetch_result != "fetched":
log_print(
'ERROR: Failed to prefetch dep "{}"'.format(dep),
other_state=other_state,
)
failure = True
pkg_state[pkg]["build_status"] = "get_dep_fail"
break
dep_fullpath = get_latest_pkg(dep, "/var/cache/pacman/pkg") dep_fullpath = get_latest_pkg(dep, "/var/cache/pacman/pkg")
if not dep_fullpath: if not dep_fullpath:
log_print( log_print(
@ -2050,22 +2030,6 @@ def prepare_user_chroot(other_state: [str, Any]):
return True return True
def prefetch_dependency(pkg_name, other_state: [str, Any]):
"""Returns "fetched" on success."""
log_print(
f'Prefetching package "{pkg_name}" with "pacman -Sw"...',
other_state=other_state,
)
try:
subprocess.run(
("/usr/bin/env", "sudo", "pacman", "--noconfirm", "-Sw", pkg_name),
check=True,
)
except subprocess.CalledProcessError:
return "fail"
return "fetched"
def main(): def main():
"""The main function.""" """The main function."""
signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGINT, signal_handler)