summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/libremakepkg11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index 5494202..99c448f 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -88,8 +88,15 @@ add_to_local_repo() {
done
}
+hook_post_build+=('cleanup')
+cleanup() {
+ local copydir=$1
+ rm -f -- "$copydir"/chroot{prepare,build}
+}
+
build() (
local copydir=$1; shift
+ local repack=$1; shift
local netflag=''
local run=()
@@ -101,6 +108,7 @@ build() (
run=(librechroot "${librechroot_flags[@]}" run)
fi
+ prepare_chroot "$copydir" "$LIBREHOME" "$repack" false
"${run[@]}" /chrootprepare "$@"
run_hook pre_build "$copydir"
trap "run_hook post_build '$copydir'" EXIT
@@ -237,11 +245,10 @@ main() {
# Pre-build
run_hook check_pkgbuild
download_sources "$copydir" "$LIBREUSER"
- prepare_chroot "$copydir" "$LIBREHOME" "$repack" false
# Build
trap "exit_copy '$copydir' '$LIBREUSER'" EXIT
- build "$copydir" "${makepkg_args[@]}"
+ build "$copydir" "$repack" "${makepkg_args[@]}"
# Post-build
run_hook check_pkg