Explorar el Código

ensure that not --assert-multi-arch supporting dpkg's do not generate
output in the testcases by redirecting to /dev/null

David Kalnischkies hace 14 años
padre
commit
c204d1482e
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      test/integration/framework

+ 2 - 2
test/integration/framework

@@ -151,7 +151,7 @@ setupenvironment() {
 	echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf
-	if ! $(which dpkg) --assert-multi-arch; then
+	if ! $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then
 		echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
 		echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
 	fi
 	fi
 	echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
 	echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
@@ -199,7 +199,7 @@ configdpkg() {
 			echo -n > rootdir/var/lib/dpkg/status
 			echo -n > rootdir/var/lib/dpkg/status
 		fi
 		fi
 	fi
 	fi
-	if $(which dpkg) --assert-multi-arch; then
+	if $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then
 		local ARCHS="$(getarchitectures)"
 		local ARCHS="$(getarchitectures)"
 		if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
 		if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
 			DPKGARCH="$(dpkg --print-architecture)"
 			DPKGARCH="$(dpkg --print-architecture)"