On Sat, Jul 01, 2017 at 04:07:08PM +0200, Jochen Sprickerhof wrote: > currently qemu-user-static doesn't depend on binfmt-support but tries to use > it > in it's postinst. Installing qemu-user-static first and binfmt-support results > in the binfmt registration not being done. I would propose to either add a > dependency to binfmt-support or add a dpkg trigger to do the registration > later.
Hi, I'm the binfmt-support maintainer. The documented way to do this correctly is to install the appropriate per-architecture set of format files in /usr/share/binfmts/ and use "update-binfmts --import <format>" in your postinst, rather than calling "update-binfmts --install ..." by hand. This has been the preferred practice since 2002. (Similarly, you should use "update-binfmts --unimport <format>" rather than "update-binfmts --remove ..." in your prerm; this is more recent, but is in buster.) If you do this, then binfmt-support will catch up with any installed packaged binary formats when its postinst runs. There's no need for a dependency on binfmt-support, but a versioned Conflicts would be appropriate to make sure that the --unimport option is available. See /usr/share/doc/binfmt-support/README.Debian for details. Cheers, -- Colin Watson [cjwat...@debian.org]