On Fri, Nov 26, 2010 at 03:14:19PM -0800, Vagrant Cascadian wrote:
> considering that the x86_64 emulation doesn't really work with
> qemu-user-static
> on i386 yet, it may be best to disble that...
the previous patch wasn't quite complete, as it left it enabled when upgrading
from the old version. the following patch should fix this, by having the
update-binfmt remove all the possible targets (the postinst handles supported
ones). the following patch seems to address this, although spits out extra
noise on targets that aren't present:
diff --git a/debian/qemu-user-static.prerm b/debian/qemu-user-static.prerm
index 7e4863b..0005fac 100644
--- a/debian/qemu-user-static.prerm
+++ b/debian/qemu-user-static.prerm
@@ -2,7 +2,7 @@
BINFMT_TARGETS= # list of architectures is autogenerated from debian/rules
-if [ "$1" = remove ] && [ -x /usr/sbin/update-binfmts ]; then
+if [ "$1" = remove ] || [ "$1" = upgrade ] && [ -x /usr/sbin/update-binfmts ];
then
for target in $BINFMT_TARGETS ; do
update-binfmts --package qemu-user-static --remove qemu-$target
/usr/bin/qemu-$target-static
done
diff --git a/debian/rules b/debian/rules
index cc906c9..bcdd908 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,7 +42,10 @@ ifneq (,$(findstring $(DEB_HOST_ARCH), arm armel))
BINFMT_TARGETS=$(filter-out arm, $(ALL_BINFMT_TARGETS))
endif
ifeq ($(DEB_HOST_ARCH),i386)
-BINFMT_TARGETS=$(filter-out i386, $(ALL_BINFMT_TARGETS))
+# Drop support for emulating amd64 on i386, as it is broken and including it
+# interferes with environments capable of running amd64 natively.
+# http://bugs.debian.org/604712
+BINFMT_TARGETS=$(filter-out i386 x86_64, $(ALL_BINFMT_TARGETS))
endif
ifeq ($(DEB_HOST_ARCH),powerpc)
BINFMT_TARGETS=$(filter-out ppc, $(ALL_BINFMT_TARGETS))
@@ -163,8 +166,9 @@ ifeq ($(DEB_HOST_ARCH_OS),linux)
# binfmt support
sed -i -e 's/^BINFMT_TARGETS=.*/BINFMT_TARGETS=\"$(BINFMT_TARGETS)\"/g'
\
- $(CURDIR)/debian/qemu-user-static.prerm \
$(CURDIR)/debian/qemu-user-static.postinst
+ sed -i -e
's/^BINFMT_TARGETS=.*/BINFMT_TARGETS=\"$(ALL_BINFMT_TARGETS)\"/g' \
+ $(CURDIR)/debian/qemu-user-static.prerm
for target in $(BINFMT_TARGETS) ; do \
install -m 644 $(CURDIR)/debian/binfmts/qemu-$$target \
live well,
vagrant
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]