[Scons-users] symlink builder

Bill Deegan bill at baddogconsulting.com
Thu Mar 2 16:35:44 EST 2017


There's a symlink builder using command line in the same stackoverflow
question you reference..

Also Gary's comment on that builder may resolve your issue:
Probably using target_factory=Dir as an arg to your Builder will work:
builder = Builder(action=..., target_factory=Dir) see the man page under
target_factory for more. – GaryO
<http://stackoverflow.com/users/258894/garyo>

On Thu, Mar 2, 2017 at 1:33 PM, Bill Deegan <bill at baddogconsulting.com>
wrote:

>
>
> lstat is only appropriate for your symlinks, however if other sources are
> in a variant dir due to being symlinked, then stat()'ing them is the
> correct way to check if they are out of date.
>
> Directories as targets or sources aren't well supported by scons. It's
> really a file based build system.
>
> In this case, I'd just remove the symlink if it exists and recreate it
> each time.
>
> Or  change the builder to use a command line:
>
> ln -s <target> <src>
>
> That way scons may do the right thing because the signature of the command
> changes.
>
>
>
>
>
> On Thu, Mar 2, 2017 at 1:17 PM, Mark Diekhans <markd at kermodei.com> wrote:
>
>>
>> Correct.  Symlinking directories is what causes the problem.
>>
>>
>> This is immediately caused by FS.py File.diskcheck_match
>> using the results of stat rather than lstat.
>>
>> Thanks,
>> Mark
>>
>> Bill Deegan <bill at baddogconsulting.com> writes:
>> > Mark,
>> >
>> > You're symlinking a directory?
>> >
>> > -Bill
>> >
>> >
>> > On Thu, Mar 2, 2017 at 12:04 PM, Mark Diekhans <markd at kermodei.com>
>> wrote:
>> >
>> >
>> >
>> >     Yes, source to variant symlink.  However the same think happens if
>> >     symlinks are created to directories within the variant directory.
>> >
>> >     Examples of the two cases here:
>> >
>> >     http://hgwdev.soe.ucsc.edu/~markd/scons/symlinkDirProblems.tar.gz
>> >
>> >     You run scons twice to get the error.
>> >
>> >
>> >     Thanks!!!
>> >
>> >     Mark
>> >
>> >
>> >     Bill Deegan <bill at baddogconsulting.com> writes:
>> >     > So you're symlinking from a source dir to a variant dir
>> explicitly, but
>> >     only
>> >     > for one directory?
>> >     _______________________________________________
>> >     Scons-users mailing list
>> >     Scons-users at scons.org
>> >     https://pairlist4.pair.net/mailman/listinfo/scons-users
>> >
>> >
>> > _______________________________________________
>> > Scons-users mailing list
>> > Scons-users at scons.org
>> > https://pairlist4.pair.net/mailman/listinfo/scons-users
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170302/0258b38b/attachment.html>


More information about the Scons-users mailing list