Просмотр исходного кода

old-style dpkg foreign architecture adding for tests

Looks like the travis service runs on Ubuntu in a version which has dpkg
with an earlier interface implementation, so lets try if we can't make
the framework work with this dpkg version as well.

Git-Dch: Ignore
David Kalnischkies лет назад: 13
Родитель
Сommit
feae193b0c
1 измененных файлов с 7 добавлено и 1 удалено
  1. 7 1
      test/integration/framework

+ 7 - 1
test/integration/framework

@@ -240,7 +240,13 @@ configdpkg() {
 		if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
 			DPKGARCH="$(dpkg --print-architecture)"
 			for ARCH in ${ARCHS}; do
-				if [ "${ARCH}" != "${DPKGARCH}" ]; then dpkg --add-architecture ${ARCH}; fi
+				if [ "${ARCH}" != "${DPKGARCH}" ]; then
+					if ! dpkg --add-architecture ${ARCH}; then
+						# old-style used e.g. in Ubuntu-P – and as it seems travis
+						echo "DPKG::options:: \"--foreign-architecture\";" >> aptconfig.conf
+						echo "DPKG::options:: \"${ARCH}\";" >> aptconfig.conf
+					fi
+				fi
 			done
 			if [ "0" = "$(dpkg -l dpkg 2> /dev/null | grep '^i' | wc -l)" ]; then
 				# dpkg doesn't really check the version as long as it is fully installed,