Bug#912892: pybuild confuses host and target

2019-03-06 Thread Helmut Grohne
Hi Piotr,

On Wed, Mar 06, 2019 at 02:04:52PM +0100, Piotr Ożarowski wrote:
> > | try:
> > | # Set _PYTHON_HOST_PLATFORM to ensure debugging symbols on, f.e. 
> > i386
> > | # emded a constant name regardless of the 32/64-bit kernel.
> > | env.setdefault(
> > | '_PYTHON_HOST_PLATFORM',
> > | 
> > '{env[DEB_TARGET_ARCH_OS]}-{env[DEB_TARGET_ARCH]}'.format(env=env))
> > | except KeyError:
> > | pass
> > 
> > That's wrong. You're confusing host and target here. Please use
> > DEB_HOST_* instead of DEB_TARGET_*. Refer to man 1 dpkg-architecture for
> > their definitions.
> 
> I just applied your patch from 901759 and since I don't know much about
> multiarch and you didn't change this part in your patch: is this still
> valid? Should I replace DEB_TARGET with DEB_HOST in above snippet? 

Those are separate issues. I try to avoid merging independent issues
into a single patch as that makes tracking down potential regressions
harder.

This bug and my recommendation are still valid. Can I somehow help with
improving your knowledge about multiarch? I suggest using the following
rule of thumb:

When you think "target" and you're not working on gcc, you usually want
"host".

Helmut



Bug#912892: pybuild confuses host and target

2019-03-06 Thread Piotr Ożarowski
Hi,

> | try:
> | # Set _PYTHON_HOST_PLATFORM to ensure debugging symbols on, f.e. 
> i386
> | # emded a constant name regardless of the 32/64-bit kernel.
> | env.setdefault(
> | '_PYTHON_HOST_PLATFORM',
> | 
> '{env[DEB_TARGET_ARCH_OS]}-{env[DEB_TARGET_ARCH]}'.format(env=env))
> | except KeyError:
> | pass
> 
> That's wrong. You're confusing host and target here. Please use
> DEB_HOST_* instead of DEB_TARGET_*. Refer to man 1 dpkg-architecture for
> their definitions.

I just applied your patch from 901759 and since I don't know much about
multiarch and you didn't change this part in your patch: is this still
valid? Should I replace DEB_TARGET with DEB_HOST in above snippet? 



Bug#912892: pybuild confuses host and target

2018-11-04 Thread Helmut Grohne
Package: dh-python
Version: 3.20180927
File: /usr/bin/pybuild

/usr/bin/pybuild has:

| try:
| # Set _PYTHON_HOST_PLATFORM to ensure debugging symbols on, f.e. i386
| # emded a constant name regardless of the 32/64-bit kernel.
| env.setdefault(
| '_PYTHON_HOST_PLATFORM',
| 
'{env[DEB_TARGET_ARCH_OS]}-{env[DEB_TARGET_ARCH]}'.format(env=env))
| except KeyError:
| pass

That's wrong. You're confusing host and target here. Please use
DEB_HOST_* instead of DEB_TARGET_*. Refer to man 1 dpkg-architecture for
their definitions.

Helmut