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:
parent
ca7a1de4e3
commit
db4c4fc17a
5 changed files with 22 additions and 13 deletions
19
builder.py
19
builder.py
|
|
@ -77,7 +77,7 @@ class BuildJob:
|
|||
if vars.NO_OOB or dirty == True:
|
||||
self._start_do()
|
||||
else:
|
||||
self._start_oob(dirty)
|
||||
self._start_unlocked(dirty)
|
||||
|
||||
def _start_do(self):
|
||||
assert(self.lock.owned)
|
||||
|
|
@ -142,15 +142,18 @@ class BuildJob:
|
|||
state.commit()
|
||||
jwack.start_job(t, self._do_subproc, self._after)
|
||||
|
||||
def _start_oob(self, dirty):
|
||||
def _start_unlocked(self, dirty):
|
||||
# out-of-band redo of some sub-objects. This happens when we're not
|
||||
# quite sure if t needs to be built or not (because some children look
|
||||
# dirty, but might turn out to be clean thanks to checksums). We have
|
||||
# to call redo-oob to figure it all out.
|
||||
# quite sure if t needs to be built or not (because some children
|
||||
# look dirty, but might turn out to be clean thanks to checksums).
|
||||
# We have to call redo-unlocked to figure it all out.
|
||||
#
|
||||
# Note: redo-oob will handle all the updating of sf, so we don't have
|
||||
# to do it here, nor call _after1.
|
||||
argv = ['redo-oob', self.sf.name] + [d.name for d in dirty]
|
||||
# Note: redo-unlocked will handle all the updating of sf, so we
|
||||
# don't have to do it here, nor call _after1. However, we have to
|
||||
# hold onto the lock because otherwise we would introduce a race
|
||||
# condition; that's why it's called redo-unlocked, because it doesn't
|
||||
# grab a lock.
|
||||
argv = ['redo-unlocked', self.sf.name] + [d.name for d in dirty]
|
||||
log('(%s)\n' % _nice(self.t))
|
||||
state.commit()
|
||||
def run():
|
||||
|
|
|
|||
|
|
@ -29,8 +29,9 @@ done
|
|||
python -mcompileall $LIBDIR
|
||||
|
||||
# binaries
|
||||
for d in redo redo-ifchange redo-ifcreate redo-always redo-stamp redo-oob; do
|
||||
fix=$(echo $d | sed 's,-,_,g')
|
||||
for dd in redo*.py; do
|
||||
d=$(basename $dd .py)
|
||||
fix=$(echo $d | sed -e 's,-,_,g')
|
||||
cat >install.wrapper <<-EOF
|
||||
#!/usr/bin/python
|
||||
import sys, os;
|
||||
|
|
|
|||
1
redo-oob
1
redo-oob
|
|
@ -1 +0,0 @@
|
|||
redo-oob.py
|
||||
1
redo-unlocked
Symbolic link
1
redo-unlocked
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
redo-unlocked.py
|
||||
|
|
@ -15,14 +15,19 @@ for d in deps:
|
|||
|
||||
me = state.File(name=target)
|
||||
|
||||
# Build the known dependencies of our primary target. This *does* require
|
||||
# grabbing locks.
|
||||
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.
|
||||
# We know our caller already owns the lock on target, so we don't have to
|
||||
# acquire another one; tell redo-ifchange about that. Also, REDO_NO_OOB
|
||||
# persists from up above, because we don't want to do OOB now either.
|
||||
# (Actually it's most important for the primary target, since it's the one
|
||||
# who initiated the OOB in the first place.)
|
||||
os.environ['REDO_UNLOCKED'] = '1'
|
||||
argv = ['redo-ifchange', target]
|
||||
rv = os.spawnvp(os.P_WAIT, argv[0], argv)
|
||||
Loading…
Add table
Add a link
Reference in a new issue