Bug#876901: QFINDTESTDATA uses __FILE__

Ximin Luo infinity0 at debian.org
Wed Nov 15 23:01:00 UTC 2017


Lisandro Damián Nicanor Pérez Meyer:
> On miércoles, 15 de noviembre de 2017 20:35:00 -03 Ximin Luo wrote:
>> Lisandro Damián Nicanor Pérez Meyer:
>>> I was wanting to write this on a keyboard, but let me try on the phone and
>>> see if we can all agree in one point.
>>>
>>> There is one *excellent* method to settle this once and forever: submit
>>> the
>>> __FILE__ patch to GCC devs. If it gets accepted then Qt and whatever
>>> project is affected should change it.
>>>
>>> If it does not gets accepted then it's a Debian regression.
>>>
>>> Until that is done I will consider this a non-Qt bug but a GCC regression.
>>> Show me that GCC upstream devs agree with you Xi and I'll happily forward
>>> the bug to Qt upstream.
>>
>> That sounds perfectly fair to me, and in line with my existing plans. Thanks
>> for your patience, and I will ping back hopefully with good news in a few
>> months.
> 
> By the way: I will consider this as a valid patch if it changes the __FILE__ 
> **default** behavior, not something that can make it change at the will of the 
> builder (like an environmet variable or such).
> 
> Having the chance of changing the meaning does not means it can be a 
> regression.
> 

The GCC patch (neither the previous nor the planned version) does not change the default behaviour of __FILE__, and was never intended to. Instead, it gives users the ability to rewrite __FILE__, more specifically a prefix of it.

There is a separate patch to dpkg that enables this ability for all packages, in the same way that SOURCE_DATE_EPOCH is enabled. Guillem the dpkg maintainer has previously indicated that he's happy to take the patch, once GCC accepts their end of it.

It's a combination of these two patches that would cause these QT tests to fail. The reason it fails, is because we specifically map $PWD to a non-existent path. I suggested various ways around this. One of the suggestions, was to add an extra mapping to map $PWD/tests back to $PWD/tests (or just ./tests), overriding the earlier non-existent mapping. I think this is the cleanest suggestion - assuming that tests reside in the same directory, and away from the main source code. Kai Pastor over on bug #876934 indicated that this would probably work for openorienteering-mapper.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Reproducible-builds mailing list