summaryrefslogtreecommitdiff
path: root/src/chroot-tools/librechroot
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-04-10 22:25:31 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-04-11 13:02:28 -0400
commit5bee2f3948bf253fd01e1207233f79ec5e6f43ef (patch)
tree55878aa855dc97121fcc8843eb76530be535ac62 /src/chroot-tools/librechroot
parentdfad28ac247a2cb319de4cb3c91421344c3382d0 (diff)
librechroot: Load makechrootpkg.sh into the main process.
makechrootpkg.sh has now been patched to make it ok with `set -euE`.
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-xsrc/chroot-tools/librechroot17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 90f364e..04957d4 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -32,6 +32,7 @@ set -euE
. "$(librelib conf)"
. "$(librelib messages)"
+. "$(librelib chroot/makechrootpkg)"
shopt -s nullglob
umask 0022
@@ -128,14 +129,6 @@ mkarchroot() {
"${pkgs[@]}"
}
-# Usage: _makechrootpkg $function $arguments...
-# Don't load $_makechrootpkg directly because it doesn't work with -euE
-_makechrootpkg() (
- set +euE
- . "$_makechrootpkg"
- "$@"
-)
-
################################################################################
# Utility functions #
################################################################################
@@ -432,7 +425,7 @@ main() {
if [[ ! -d $copydir ]] || [[ $mode == sync ]]; then
msg "Syncing copy [%s] with root copy" "$COPY"
- _makechrootpkg sync_chroot "$CHROOTDIR/$CHROOT" "$COPY"
+ sync_chroot "$CHROOTDIR/$CHROOT" "$copydir" "$COPY"
fi
# Note: the in-chroot pkgconfdir is non-configurable, this is
@@ -465,14 +458,14 @@ main() {
noop|make|sync) :;;
delete)
if [[ -d $copydir ]]; then
- _makechrootpkg delete_chroot "$copydir"
+ delete_chroot "$copydir"
fi
;;
# Dealing with packages
install-file)
- _makechrootpkg install_packages "$copydir" "$@"
- chroot_add_to_local_repo "$copydir" "$@"
+ install_packages "$copydir" "$@"
+ chroot_add_to_local_repo "$copydir" "$@"
;;
install-name)
arch-nspawn "$copydir" pacman -Sy -- "$@"