From ccee85b2ab8131a1eb285a90bf4107ee638952a6 Mon Sep 17 00:00:00 2001 From: Vekhir -- Date: Tue, 16 Apr 2024 21:39:22 +0000 Subject: 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 --- src/makechrootpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/makechrootpkg.in') 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/}" -- cgit v1.2.3-70-g09d2