summaryrefslogtreecommitdiff
path: root/src/chroot-tools/librechroot
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-07 12:24:18 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-09 14:20:48 -0500
commit056aac864aaa989a17703857e8e0e9b67726fc22 (patch)
treee8fbec3d569f2ac114ff2d26d8e0046513293a0d /src/chroot-tools/librechroot
parent70e1601042250b395659f4c325ae7a73cbe238ab (diff)
Improve chcleanup, make supporting changes to other tools
chcleanup: * load `CHROOTEXTRAPKGS` from `/etc/libretools.d/chroot.conf` * always cleanup temporary files * properly quote the various arrays used * verify that you are in a chroot librechroot: * write `$copydir/etc/libretools.d/chroot.conf` libremakepkg.gpl2: * use `librechroot` instead of `archroot` directly in `chrootexec()`
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-xsrc/chroot-tools/librechroot11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 0a7ba65..52a3bdf 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -116,6 +116,17 @@ main() {
sync
fi
+ mkdir -p $copydir/etc/libretools.d
+ {
+ if [[ -n ${CHROOTEXTRAPKG[@]:-} ]]; then
+ printf 'CHROOTEXTRAPKG=('
+ printf "'%s' " "${CHROOTEXTRAPKG[@]}"
+ printf ')\n'
+ else
+ printf 'CHROOTEXTRAPKG=()\n'
+ fi
+ } > $copydir/etc/libretools.d/chroot.conf
+
########################################################################
trap cleanup EXIT