[Scons-users] tagging files (RPM packaging)
Mats Wichmann
mats at wichmann.us
Mon Jan 3 15:53:26 EST 2022
On 1/3/22 00:06, Werner Reisberger wrote:
>> On Sun, Jan 2, 2022 at 2:52 AM Werner Reisberger <wr at pure.ch> wrote:
>>
>>> On 2022-01-01 23:00, Bill Deegan wrote:
>>>> Can you try:
>>>>
>>>> Tag('file2.txt', 'DOC')
>>>
>>> This gives me: AttributeError: 'SConsEnvironment' object has no
>>> attribute 'Tag':
>>> Calling
>>> env.Tag('file2.txt', 'DOC')
>>> gives: AttributeError: 'str' object has no attribute 'Tag':
Okay, so I can confirm the packaging tool (generically, not specific to
the rpm piece) does not take the steps that most of the rest of the
codebase does of being explicit about accepting different types where a
node type is "expected".
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.
More information about the Scons-users
mailing list