Rename redo-oob to redo-unlocked, to more accurately represent its use.

It's still undocumented.  Because you shouldn't run it by hand.  So don't!
It's dangerous!
This commit is contained in:
Avery Pennarun 2010-12-19 01:19:52 -08:00
commit db4c4fc17a
5 changed files with 22 additions and 13 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/python
import sys, os
import state
from log import err
if len(sys.argv[1:]) < 2:
err('%s: at least 2 arguments expected.\n' % sys.argv[0])
sys.exit(1)
target = sys.argv[1]
deps = sys.argv[2:]
for d in deps:
assert(d != target)
me = state.File(name=target)
os.environ['REDO_NO_OOB'] = '1'
argv = ['redo-ifchange'] + deps
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
if 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'
argv = ['redo-ifchange', target]
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
if rv:
sys.exit(rv)