[arch-projects] [dbscripts] [PATCH 1/2] pacman 5.1 compatibility

Eli Schwartz eschwartz at archlinux.org
Tue May 29 00:02:21 UTC 2018


The print_all_package_names function changed its behavior, adapt

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 test/lib/common.bash | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/lib/common.bash b/test/lib/common.bash
index 36c735fd..738cc972 100644
--- a/test/lib/common.bash
+++ b/test/lib/common.bash
@@ -30,7 +30,7 @@ __buildPackage() {
 	local cache
 	local pkgarches
 	local tarch
-	local pkgnames
+	local pkgfiles
 
 	if [[ -n ${BUILDDIR} ]]; then
 		cache=${BUILDDIR}/$(__getCheckSum PKGBUILD)
@@ -45,14 +45,14 @@ __buildPackage() {
 	for tarch in ${pkgarches[@]}; do
 		if [ "${tarch}" == 'any' ]; then
 			PKGDEST=${pkgdest} PKGEXT=${PKGEXT} makepkg -c
+			mapfile -tO "${#pkgfiles[@]}" pkgfiles < <(PKGDEST=${pkgdest} PKGEXT=${PKGEXT} makepkg --packagelist)
 		else
 			PKGDEST=${pkgdest} PKGEXT=${PKGEXT} CARCH=${tarch} makepkg -c
+			mapfile -tO "${#pkgfiles[@]}" pkgfiles < <(PKGDEST=${pkgdest} PKGEXT=${PKGEXT} CARCH=${tarch} makepkg --packagelist)
 		fi
 	done
 
-	pkgnames=($(. PKGBUILD; print_all_package_names))
-	pushd ${pkgdest}
-	for p in ${pkgnames[@]/%/${PKGEXT}}; do
+	for p in ${pkgfiles[@]}; do
 		# Manually sign packages as "makepkg --sign" is buggy
 		gpg -v --detach-sign --no-armor --use-agent ${p}
 
@@ -60,7 +60,6 @@ __buildPackage() {
 			cp -Lv ${p}{,.sig} ${cache}/
 		fi
 	done
-	popd
 }
 
 __archrelease() {
-- 
2.17.0


More information about the arch-projects mailing list