Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVekhir -- <vekhir@yahoo.com>2024-04-16 21:39:22 +0000
committerVekhir <Vekhir@yahoo.com>2024-04-16 23:50:12 +0200
commitccee85b2ab8131a1eb285a90bf4107ee638952a6 (patch)
treeced42fe132d1822cc1af82af89291b04907cb3ea /src
parent05bea3e922aa7aec5cba3242d3f34b5c10fad24e (diff)
fix: conflicting packages when using -I
Originally fixed in b7893a2ca8e09062197129881bce3fd6700a573a, that approach created another bug when packages have several providers. In that case, pacman expects a number, so "yes" is not a valid answer, leading to an infinite loop. Using the undocumented, but stable option "--ask=4" allows to selectively change the default answer for conflicts, therefore properly fixing the underlying issue. See also: https://gitlab.archlinux.org/pacman/pacman/-/issues/60 Fixes #163 Component: makechrootpkg
Diffstat (limited to 'src')
-rw-r--r--src/makechrootpkg.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/makechrootpkg.in b/src/makechrootpkg.in
index 14b8f11..5378eb1 100644
--- a/src/makechrootpkg.in
+++ b/src/makechrootpkg.in
@@ -149,7 +149,7 @@ install_packages() {
cp -- "${install_pkgs[@]}" "$copydir/root/"
arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
- bash -c 'yes y | pacman -U -- "$@"' -bash "${pkgnames[@]/#//root/}"
+ pacman -U --noconfirm --ask=4 -- "${pkgnames[@]/#//root/}"
ret=$?
rm -- "${pkgnames[@]/#/$copydir/root/}"