Timing problem with '%buildsubdir'
Andreas Scherer
andreas.scherer at alice.de
Sun Jan 31 09:27:45 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Why is macro '%buildsubdir' not available in section '%prep'?
According to the comment in 'macros[.in]', '%buildsubdir' is "set
after processing %setup", but there seems to be a timing problem in
setting and resolving this particular item.
%prep
%setup -c
%{echo:<<<PREP:%buildsubdir>>>}
produces "<<<PREP:%buildsubdir>>>, i.e., the macro is _not_ set at
this point, while a later
%build
%{echo:<<<BUILD:%buildsubdir>>>}
produces the expected <<<BUILD:sgb-20090810>>>. (Using
'https://github.com/ascherer/sgb/blob/local/sgb.spec' as example.)
Internally, 'doSetupMacro()' uses 'spec->buildSubdir' for referencing
the project building area, and calls 'addMacro(...,"buildsubdir",...)'
on the way.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iEYEARECAAYFAlat05EACgkQpGC+y3YKfI7dJgCfZmS9W7s1MksR2y3ZfXUrjXjS
B6oAnA21/czC0HvLMO5dQ4Ejj/1e6Z2Y
=3VC6
-----END PGP SIGNATURE-----
More information about the Rpm-list
mailing list