Skip to content

Commit

Permalink
Test dpkg for multiarch support in lxc-debian template
Browse files Browse the repository at this point in the history
Signed-off-by: David Noyes <david.j.noyes@gmail.com>
  • Loading branch information
David Noyes authored and stgraber committed Aug 28, 2015
1 parent 2d533d7 commit 49e7702
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/lxc-debian.in
Expand Up @@ -385,6 +385,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
Expand Down

0 comments on commit 49e7702

Please sign in to comment.