[Scons-users] tagging files (RPM packaging)
Werner Reisberger
wr at pure.ch
Mon Jan 17 10:58:09 EST 2022
On 2022-01-03 21:53, Mats Wichmann wrote:
> Manpage:
>
> Tag(node, tags)
>
> Annotates file or directory Nodes ...
>
> and it is indeed expecting to actually get a Node - this is why your
> working example works, you explicitly create the Nodes first. it
> doesn't pay any attention to whether it's a string and if so generating
> a node from it. Will leave it to Bill to comment whether it should
> (basically, calling env.argnodes(target) to convert, I believe).
>
> Obviously, we can correct the docs if nothing else.
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:
You have to say
Tag(node, DOC=' ')
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.
--Werner
More information about the Scons-users
mailing list