Whoops, redo-oob was slightly wrong when used with -j.
We called 'redo' instead of 'redo-ifchange' on our indeterminate objects. Since other instances of redo-oob might be running at the same time, this could cause the same object to get rebuilt more than once unnecessarily. The unit tests caught this, I just didn't notice earlier.
This commit is contained in:
parent
e7f7119f2e
commit
91630a892a
3 changed files with 8 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ class BuildJob:
|
||||||
except ImmediateReturn, e:
|
except ImmediateReturn, e:
|
||||||
return self._after2(e.rv)
|
return self._after2(e.rv)
|
||||||
|
|
||||||
if dirty == True:
|
if vars.NO_OOB or dirty == True:
|
||||||
self._start_do()
|
self._start_do()
|
||||||
else:
|
else:
|
||||||
self._start_oob(dirty)
|
self._start_oob(dirty)
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,14 @@ deps = sys.argv[2:]
|
||||||
|
|
||||||
me = state.File(name=target)
|
me = state.File(name=target)
|
||||||
|
|
||||||
argv = ['redo'] + deps
|
os.environ['REDO_NO_OOB'] = '1'
|
||||||
|
argv = ['redo-ifchange'] + deps
|
||||||
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
|
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
|
||||||
if rv:
|
if rv:
|
||||||
sys.exit(rv)
|
sys.exit(rv)
|
||||||
|
|
||||||
|
# we know our caller already owns the lock on target, so we don't have to
|
||||||
|
# acquire another one.
|
||||||
os.environ['REDO_UNLOCKED'] = '1'
|
os.environ['REDO_UNLOCKED'] = '1'
|
||||||
argv = ['redo-ifchange', target]
|
argv = ['redo-ifchange', target]
|
||||||
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
|
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
|
||||||
|
|
|
||||||
3
vars.py
3
vars.py
|
|
@ -25,3 +25,6 @@ while BASE and BASE.endswith('/'):
|
||||||
|
|
||||||
UNLOCKED = os.environ.get('REDO_UNLOCKED', '') and 1 or 0
|
UNLOCKED = os.environ.get('REDO_UNLOCKED', '') and 1 or 0
|
||||||
os.environ['REDO_UNLOCKED'] = '' # not inheritable by subprocesses
|
os.environ['REDO_UNLOCKED'] = '' # not inheritable by subprocesses
|
||||||
|
|
||||||
|
NO_OOB = os.environ.get('REDO_NO_OOB', '') and 1 or 0
|
||||||
|
os.environ['REDO_NO_OOB'] = '' # not inheritable by subprocesses
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue