Some very suspicious changes to relpath() and sname() calls.
The problem is that redo-ifchange has a different $PWD than its sub-dependencies, so as it's chasing them down, fixing up the relative paths totally doesn't work at all. There's probably a much smarter fix than this, but it's too late at night to think of it right now.
This commit is contained in:
parent
d9fe4806ac
commit
84046bcab2
3 changed files with 19 additions and 14 deletions
13
helpers.py
13
helpers.py
|
|
@ -83,12 +83,17 @@ def relpath(t, base):
|
|||
return '/'.join(tparts)
|
||||
|
||||
|
||||
def sname(typ, t):
|
||||
def sname(typ, t, fromdir=None):
|
||||
# FIXME: t.replace(...) is non-reversible and non-unique here!
|
||||
if fromdir:
|
||||
t = os.path.join(fromdir, t)
|
||||
tnew = relpath(t, vars.BASE)
|
||||
#log('sname: (%r) %r -> %r\n' % (vars.BASE, t, tnew))
|
||||
return vars.BASE + ('/.redo/%s^%s' % (typ, tnew.replace('/', '^')))
|
||||
v = vars.BASE + ('/.redo/%s^%s' % (typ, tnew.replace('/', '^')))
|
||||
debug2('sname: (%r) %r -> %r\n' % (os.getcwd(), t, tnew))
|
||||
return v
|
||||
|
||||
|
||||
def add_dep(t, mode, dep):
|
||||
open(sname('dep', t), 'a').write('%s %s\n' % (mode, dep))
|
||||
debug2('add-dep(%r)\n' % t)
|
||||
open(sname('dep', t), 'a').write('%s %s\n'
|
||||
% (mode, relpath(dep, vars.BASE)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue