Hi, On Wed, 16 Mar 2011, Per Jessen wrote:
Thanks for the explanation, that was just what I needed. And look what the spec file has:
%build touch -r ./ver.c ./ver.c.stamp sed -i -e s@__DATE__@__TIMESTAMP__@ ./ver.c touch -r ./ver.c.stamp ./ver.c
However, the changelog actually says:
------------------------------------------------------------------- Mon Aug 30 22:49:25 UTC 2010 - cristian.rodriguez@opensuse.org
- use __TIMESTAMP__ instead of __DATE__ to make build-compare happy.
So what's the story?
That is because Cristian M. is wrong: DATE and TIME depend on the current time of compilation, but TIMESTAMP, as the name implies, depends on the mtime of the file to be compiled, hence as long as it isn't changed it will stay the same for each compilation, exactly what we want for build compare. Of course the very replacing of __DATE__ for __TIMESTAMP__ does change the file, hence mtime, ergo __TIMESTAMP__. That's why Cristian R. did the creative use of 'touch -r' to save/restore mtime. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org