[Scons-users] tagging files (RPM packaging)

Mats Wichmann mats at wichmann.us
Mon Jan 17 12:05:41 EST 2022


On 1/17/22 08:58, Werner Reisberger wrote:

> Sorry to come back with this so late but there is not only the
> issue/ambiguity string vs node.
> 
> Following the man page the tagging even doesn't work if I use a node:
> 
>    Tag(node, DOC)
> 
> should create a '%doc ' macro in front of a file name in a rpm spec
> file. But this call fails with
> 
>    NameError: name 'DOC' is not defined:

Yes, in this form the tag name has to be a string. The example is
clearly wrong, and I'm not sure it necessarily works as expected even if
fixed to be a string.
> 
> You have to say
> 
>    Tag(node, DOC=' ')

this one works because as a keyword argument SCons takes the key as a
string.
> 
> to make it work. This workaround can not be easily deduced from the man
> page and has to be applied to many other RPM file tags (e.g. CONFIG).
> 
> Please check my example code on GitHub as posted earlier.

You've identified some problems, I didn't end up with a chance to work
on this in any detail over the past few weeks.



More information about the Scons-users mailing list