From: David Noyes Date: Wed, 26 Aug 2015 13:18:49 +0000 (+0100) Subject: Test dpkg for multiarch support in lxc-debian template X-Git-Tag: lxc-1.0.8~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ed245257bd4c6eb6a6a27599beb00f18e8737a;p=thirdparty%2Flxc.git Test dpkg for multiarch support in lxc-debian template Signed-off-by: David Noyes --- diff --git a/templates/lxc-debian.in b/templates/lxc-debian.in index 0186ff297..9e75bf917 100644 --- a/templates/lxc-debian.in +++ b/templates/lxc-debian.in @@ -379,6 +379,12 @@ EOF if [ "${arch}" != "${hostarch}" ]; then mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch + + # Test if dpkg supports multiarch + if chroot $rootfs dpkg -l dpkg 2>&1 | grep -q "unknown option 'foreign-architecture'"; then + echo "dpkg does not support multiarch: removing multiarch configuration file" + rm ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch + fi fi # Write a new sources.list containing both native and multiarch entries