[Scons-users] symlink builder

Bill Deegan bill at baddogconsulting.com
Thu Mar 2 16:33:23 EST 2017


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/48cba428/attachment.html>


More information about the Scons-users mailing list