[Scons-users] Errors in parallel builds after updating from SCons 2.3.0 -> 2.3.5

Bill Deegan bill at baddogconsulting.com
Mon Sep 28 13:24:30 EDT 2015


Oh.. if you need the install to always run..

AlwaysBuild(target, ...) , env.AlwaysBuild(target, ...)

Marks each given target so that it is always assumed to be out of date, and
will always be rebuilt if needed. Note, however, that AlwaysBuild does not
add its target(s) to the default target list, so the targets will only be
built if they are specified on the command line, or are a dependent of a
target specified on the command line--but they will *always* be built if so
specified. Multiple targets can be passed in to a single call to AlwaysBuild.



env = Environment()
fstab_inst = env.Install("./install", "/etc/fstab")

env.AlwaysBuild(fstab_inst)

Should do it.

-Bill







On Mon, Sep 28, 2015 at 10:17 AM, <mg at ncp-e.com> wrote:

> I wasn't aware that None would be problematic. It's just that I need an
> "always run" Command builder that's got no input.
>
> I've replaced it with Value(None) but it didn't change anything.
>
> So you think issuing new directives while executing cmdFunc in the
> example below doesn't pose a problem?
> As that's the spot in which my build breaks. The "env.Install" line
> leads to the exception within SCons internals.
>
> On Mon, Sep 28, 2015 at 06:34:48PM +0200, Bill Deegan wrote:
> >    Your target node for the Command is None.
> >    That's likely your issue. You're specifying None as a Node object.
> >
> >    You should likely use Value(None) or something like that.
> >    Search for "Value(" in
> >    [1]http://scons.org/doc/production/HTML/scons-man.html
> >
> >    -Bill
> >    On Mon, Sep 28, 2015 at 9:29 AM, <[2]mg at ncp-e.com> wrote:
> >
> >      >    Can you share any code so we can understand what you're talking
> >      about?
> >
> >      Of course. I broke it down to this:
> >
> >
> ------------------------------------------------------------------------
> >      env = Environment()
> >
> >      def cmdFunc(target, source, env):
> >              fstab_inst = env.Install("./install", "/etc/fstab")
> >
> >      env.Command(
> >              "some_cmd",
> >              None,
> >              cmdFunc,
> >      )
> >
> ------------------------------------------------------------------------
> >
> >      So I'm adding a new target during execution of the Command builder.
> It
> >      works in this example and even in my more complex case. The latter
> as
> >      long as I don't use multiple jobs in SCons > 2.3.0.
> >
> >      From the SCons documentation I'm not clear if this kind of code is
> even
> >      allowed.
> >
> >      Thanks
> >      Matthias
> >
>
> --
> Matthias Gerstner, Dipl.-Wirtsch.-Inf. (FH)
> Entwicklung
>
> NCP engineering GmbH
> Dombühler Straße 2, D-90449, Nürnberg
> Geschäftsführer Peter Söll, HRB-Nr: 77 86 Nürnberg
>
> Telefon: +49 911 9968-153, Fax: +49 911 9968-229
> E-Mail: Matthias.Gerstner at ncp-e.com
> Internet: http://www.ncp-e.com
>
> _______________________________________________
> 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/20150928/18097065/attachment.html>


More information about the Scons-users mailing list