Skip to content

Commit

Permalink
Merge pull request #3 from lsst/tickets/DM-2303
Browse files Browse the repository at this point in the history
Force eups operations during install to run in serial.
  • Loading branch information
Joshua Hoblitt committed Mar 30, 2015
2 parents 1f4a089 + 3146a6f commit 54c983f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions python/lsst/sconsUtils/installation.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,16 @@ def InstallEups(env, dest, files=[], presetup=""):
except ImportError:
state.log.warn("Unable to import eups; not locking")

eupsTargets = []

for i in build_obj:
env.AlwaysBuild(i)

cmd = "eups expandbuild -i --version %s " % env['version']
if env.has_key('baseversion'):
cmd += " --repoversion %s " % env['baseversion']
cmd += str(i)

env.AddPostAction(build_obj, env.Action("%s" %(cmd), cmd))
eupsTargets.extend(env.AddPostAction(build_obj, env.Action("%s" %(cmd), cmd)))

for i in table_obj:
env.AlwaysBuild(i)
Expand All @@ -342,9 +343,16 @@ def InstallEups(env, dest, files=[], presetup=""):
cmd += str(i)

act = env.Command("table", "", env.Action("%s" %(cmd), cmd))
eupsTargets.extend(act)
acts += act
env.Depends(act, i)

# By declaring that all the Eups operations create a file called "eups" as a side-effect,
# even though they don't, SCons knows it can't run them in parallel (it thinks of the
# side-effect file as something like a log, and knows you shouldn't be appending to it
# in parallel). When Eups locking is working, we may be able to remove this.
env.SideEffect("eups", eupsTargets)

return acts

#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down

0 comments on commit 54c983f

Please sign in to comment.