Hi,

I maintain a binary package that is not part of Debian (yet). The upstream content is developed for amd64 and armhf architectures and distributed using git. I build the package using git-buildpackage and pbuilder/pdebuild on an amd64 build machine with native (i.e. amd64) pbuilder. Obviously, when building for armhf, I am cross-compiling.


Recently the upstream development introduced a compile step that requires some source files to be pre-processed with a Python script (shipped with the sources). I thus added python-all to my Build-Depends field and the native build works fine again. However, the cross-build doesn't work because the postinst script of the python-minimal:armhf package tries to execute the armhf python2.7 binary on my amd64 pbuilder:

$ pdebuild -- --host-arch armhf
[...]
Setting up python2.7-minimal:armhf (2.7.13-2+deb9u2) ...
/var/lib/dpkg/info/python2.7-minimal.postinst: 42: /var/lib/dpkg/info/python2.7-minimal.postinst: python2.7: Exec format error
dpkg: error processing package python2.7-minimal:armhf (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of python-minimal:armhf:
python-minimal:armhf depends on python2.7-minimal (>= 2.7.13-1~); however:
  Package python2.7-minimal:armhf is not configured yet.

dpkg: error processing package python-minimal:armhf (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.7-minimal:armhf
 python-minimal:armhf
E: Sub-process /usr/bin/dpkg returned an error code (1)
E: Failed to process build dependencies
E: pbuilder-satisfydepends failed.

What is the correct way of handling this scenario?

Thanks & best regards,
Lukasz

Reply via email to