Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/arch-nspawn.in
diff options
context:
space:
mode:
authordeep-42-thought <github@eckner.net>2017-11-19 11:29:14 +0100
committerGitHub <noreply@github.com>2017-11-19 11:29:14 +0100
commit5d959b0109b136a8e8051a52bc0a506655e133db (patch)
treea78af3b1b8f10c2082ce66fa5dd8d3c2268d6623 /arch-nspawn.in
parent19f091cce81215ec963de34f390d8f41897602e0 (diff)
parent2a7b784e0158b46f6895bef1de6dc8b0e4145be9 (diff)
Merge pull request #1 from bbidulock/master
arch-nspawn should not take pacman cache from host
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index a0b00af..9c1961f 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -53,7 +53,11 @@ shift 1
[[ -z $working_dir ]] && die 'Please specify a working directory.'
if [[ -z $cache_dir ]]; then
- cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
+ if [[ -z $pac_conf ]]; then
+ cache_dirs=($(pacman --config "$working_dir/etc/pacman.conf" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
+ else
+ cache_dirs=($(pacman --config "$pac_conf" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
+ fi
else
cache_dirs=("$cache_dir")
fi