[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rpmorg-list
Subject:    Timing problem with '%buildsubdir'
From:       andreas.scherer () alice ! de (Andreas Scherer)
Date:       2016-01-31 9:27:45
Message-ID: 56ADD391.5090601 () alice ! de
[Download RAW message or body]

-----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-----

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic