summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 -- "$@"