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:
authorbartus <szczepaniak.bartek+github@gmail.com>2021-03-05 21:11:34 +0100
committerLevente Polyak <anthraxx@archlinux.org>2021-07-17 23:10:30 +0200
commitc5c5dbc64fe68ca0fdfdab177520f9fdb1d7fcd8 (patch)
treeffd55bf565f22107e8574ae0068d21107bde78c1 /arch-nspawn.in
parent0a0e66a784d4831c4139bf646b5329bff54465d7 (diff)
Drop pacutils:`pacconf` fallback
As of pacman:5.2 `pacman-conf` obsoletes `pacconf`
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index ce60600..a612624 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -57,14 +57,12 @@ shift 1
[[ -z $working_dir ]] && die 'Please specify a working directory.'
-pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
-
if (( ${#cache_dirs[@]} == 0 )); then
- mapfile -t cache_dirs < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
+ mapfile -t cache_dirs < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
fi
# shellcheck disable=2016
-host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
+host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
for host_mirror in "${host_mirrors[@]}"; do
if [[ $host_mirror == *file://* ]]; then
@@ -76,7 +74,7 @@ for host_mirror in "${host_mirrors[@]}"; do
done
while read -r line; do
- mapfile -t lines < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
+ mapfile -t lines < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
--repo $line Server | sed -r 's#(.*/)[^/]+/os/.+#\1#')
for line in "${lines[@]}"; do
if [[ $line = file://* ]]; then
@@ -84,7 +82,7 @@ while read -r line; do
in_array "$line" "${cache_dirs[@]}" || cache_dirs+=("$line")
fi
done
-done < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
+done < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
mount_args+=("--bind=${cache_dirs[0]//:/\\:}")