summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chroot-tools/chcleanup.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/chroot-tools/chcleanup.in b/src/chroot-tools/chcleanup.in
index 1d674aa..89339a6 100644
--- a/src/chroot-tools/chcleanup.in
+++ b/src/chroot-tools/chcleanup.in
@@ -90,7 +90,11 @@ pacman=(pacman --dbpath="$TEMPDIR/db" --hookdir="$TEMPDIR/hooks")
msg2 "Creating a full list of packages..."
for var in CHROOTPKG CHROOTEXTRAPKG DEPENDS; do
declare -n pkgsref="$var"
- mapfile -t pkgs < <("${pacman[@]}" -T -- "${pkgsref[@]}")
+ if [[ $var = DEPENDS ]]; then
+ mapfile -t pkgs < <("${pacman[@]}" -T -- "${pkgsref[@]}")
+ else
+ pkgs=("${pkgsref[@]}")
+ fi
if (( ${#pkgs[@]} == 0 )); then
continue
fi