Commit 49e7702b by David Noyes Committed by Stéphane Graber

Test dpkg for multiarch support in lxc-debian template

parent 2d533d7a
...@@ -385,6 +385,12 @@ EOF ...@@ -385,6 +385,12 @@ EOF
if [ "${arch}" != "${hostarch}" ]; then if [ "${arch}" != "${hostarch}" ]; then
mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d
echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch 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 fi
# Write a new sources.list containing both native and multiarch entries # Write a new sources.list containing both native and multiarch entries
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment