summaryrefslogtreecommitdiff
path: root/bin/build-packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-20 13:12:20 +0200
committerErich Eckner <git@eckner.net>2019-05-20 13:12:20 +0200
commit167e29229fe975ca16ff8fba26e7e2d83dfc653b (patch)
tree77bbb4e1428de6cf9bf13d25887aa6d68dbae1cf /bin/build-packages
parent1476a70e18cbf914b02f8b400e1b7cd08cbeb2fa (diff)
downloadbuilder-167e29229fe975ca16ff8fba26e7e2d83dfc653b.tar.xz
bin/build-packages: :clean_chroot: sets -c for makepkg, which may be insufficient for removing still mounted submounts (e.g. /run) - we now run recursively_umount_and_rm to (hopefully) clean the build chroot entirely
Diffstat (limited to 'bin/build-packages')
-rwxr-xr-xbin/build-packages8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/build-packages b/bin/build-packages
index 46dcff5..73279f9 100755
--- a/bin/build-packages
+++ b/bin/build-packages
@@ -524,6 +524,14 @@ while [ "${count}" -ne 0 ] && \
find . -maxdepth 1 -type f \( -name '*.pkg.tar.xz' -o -name '*.pkg.tar.xz.sig' \) -exec \
rm {} \;
+ if echo "${outerParameters}" | \
+ grep -qwF -- '-c'; then
+ # sometimes it is necessary to manually remove the root/ build
+ # directory (due to leftover mounts of /run) - so we just do
+ # it everytime '-c' is set
+ recursively_umount_and_rm '/var/lib/archbuild/'"${build_command%-build}"
+ fi
+
echo 'building' > "${tmp_dir}/.ping-build-master"
>&2 printf '%s: building package "%s" (revisions %s %s, repository %s, straw %s) for %s ...' \
"$(date +'%Y-%m-%d %T')" \