On Sun, Sep 18, 2016 at 05:54:17AM -0400, Joe Crayne wrote:
> I've attached a patch that will make dh-python Multi-Arch aware by making
> use of the environment variable DPKG_MAINTSCRIPT_ARCH which is provided in
> the environment by dpkg.
> 
> Specifying the architecture this way will prevent a failure that requires
> the human administrator to fix.  With version 3.5.1-4 of python3-minimal it
> will unfortunately redundantly compile packages when multiple architecture
> variants provide the same python modules.  However, I've submitted a patch
> to python3-minimal that would correct that behavior.
>...
> --- a/autoscripts/postinst-py3compile
> +++ b/autoscripts/postinst-py3compile
> @@ -1,3 +1,3 @@
>  if which py3compile >/dev/null 2>&1; then
> -     py3compile -p #PACKAGE# #ARGS#
> +     py3compile -p #PACKAGE#:$DPKG_MAINTSCRIPT_ARCH #ARGS#
>  fi
>...

The correct approach is actually to disallow py{,3}compile in
Multi-Arch: same packages.

It does not even make much sense since it is not possible to install 
multiple architectures of the python interpreter at the same time,
and in normal cases the package could just be binary-all.

gir1.2-ibus-1.0 is a bit special for that, and the approach taken for 
that is to have no byte-compilation (and no python dependencies).

The latter is not perfect, but seems to be acceptable for a very
special situation (the python module is an optional part of an 
architecture-specific package). If anything should be improved
on that, the python module should be split out of the package.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Reply via email to