Bug#876901: QFINDTESTDATA uses __FILE__

Ximin Luo infinity0 at debian.org
Thu Nov 16 13:33:00 UTC 2017


Lisandro Damián Nicanor Pérez Meyer:
> By the way: is there a macro or combination of macros which *default* value 
> can be replaced in the use of __FILE__ without caussing regressions?
> 
> Because if that's the case it's easier to convince upstream people that 
> changing the usage goes in favor of reproducibility without using strange up-
> to-the-builder definitions.
> 

Unfortunately, not that I know of.

However, let me try to explain why BUILD_PATH_PREFIX_MAP is not as strange as you might think.

GCC already supports a flag -fdebug-prefix-map whose purpose is to do the same thing for debugging symbols. You can give multiple maps, to map different parts of your source tree to different other source directories. So maybe one could give a map like this:

1. "PWD/" -> "/usr/src/debug/$mypackage"
2. "PWD/tests" -> "./tests"

if one wanted to generate debugging information for your main source code, to point to installed-source-code at /usr/src/debug/$mypackage; but since one doesn't install the tests anywhere, it would be convenient for developers to have the debuginfo of tests point to ./tests instead, so they can just run "gdb -d." if stuff fails.

What I'm suggesting for QT tests would be exactly analogous to this already-supported use case for debuginfo. dpkg gives a default map corresponding to (1), and since QT tests use __FILE__ for other purposes, you give a second map corresponding to (2) above.

X

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



More information about the Reproducible-builds mailing list