Esempio n. 1
0
def should_build(t):
    f = state.File(name=t)
    if f.is_failed():
        raise builder.ImmediateReturn(32)
    dirty = deps.isdirty(f, depth = '', max_changed = vars.RUNID,
                         already_checked=[])
    return f.is_generated, dirty==[f] and deps.DIRTY or dirty
Esempio n. 2
0
def should_build(f):
    if f.stamp_mtime == 0:
        expect_stamp = state.Stamp()
    else:
        expect_stamp = f.stamp
    dirty = deps.isdirty(f, depth='', expect_stamp=expect_stamp)
    return dirty==[f] and deps.DIRTY or dirty
Esempio n. 3
0
def should_build(f):
    if f.stamp_mtime == 0:
        expect_stamp = None
    else:
        expect_stamp = f.csum or f.stamp
    dirty = deps.isdirty(f, depth='', expect_stamp=expect_stamp,
                         max_runid=vars.RUNID)
    return dirty==[f] and deps.DIRTY or dirty
Esempio n. 4
0
def should_build(t):
    f = state.File(name=t)
    if f.is_failed():
        raise builder.ImmediateReturn(32)
    status = deps.isdirty(f, depth='', max_changed=vars.RUNID)
    if status == [f]:
        return deps.DIRTY
    else:
        # FIXME: This is really confusing!
        # The status can be any one of deps.CLEAN or deps.DIRTY or
        # a list of targets to build with redo-unlocked.
        return status
Esempio n. 5
0
File: main.py Progetto: reckbo/redo
def main_redo_ood(redo_flavour, targets):
    import vars, state, deps
    from log import err

    if len(targets) != 0:
        err('%s: no arguments expected.\n', redo_flavour)
        return 1

    for f in state.files():
        if f.is_generated and f.exists():
            if deps.isdirty(f, depth='', expect_stamp=f.stamp):
                print f.name
Esempio n. 6
0
import vars_init
vars_init.init([])

import vars, state, deps
from log import err

if len(sys.argv[1:]) != 0:
    err('%s: no arguments expected.\n' % sys.argv[0])
    sys.exit(1)

cache = {}


def is_checked(f):
    return cache.get(f.id, 0)


def set_checked(f):
    cache[f.id] = 1


for f in state.files():
    if f.is_generated and f.read_stamp() != state.STAMP_MISSING:
        dirty = deps.isdirty(f,
                             depth='',
                             max_changed=vars.RUNID,
                             is_checked=is_checked,
                             set_checked=set_checked)
        if not dirty == deps.CLEAN:
            print(f.nicename())
Esempio n. 7
0
def should_build(t):
    f = state.File(name=t)
    if f.is_failed():
        raise builder.ImmediateReturn(32)
    dirty = deps.isdirty(f, depth = '', max_changed = vars.RUNID)
    return dirty==[f] and deps.DIRTY or dirty
Esempio n. 8
0
#!/usr/bin/env python
import sys, os

import vars_init
vars_init.init([])

import vars, state, deps
from log import err

if len(sys.argv[1:]) != 0:
    err('%s: no arguments expected.\n' % sys.argv[0])
    sys.exit(1)


cache = {}

def is_checked(f):
    return cache.get(f.id, 0)

def set_checked(f):
    cache[f.id] = 1


for f in state.files():
    if f.is_generated and f.read_stamp() != state.STAMP_MISSING:
        if deps.isdirty(f, depth='', max_changed=vars.RUNID,
                        is_checked=is_checked, set_checked=set_checked):
            print f.nicename()
Esempio n. 9
0
#!/usr/bin/env python2
import sys, os

import vars_init
vars_init.init([])

import vars, state, deps
from logs import err

if len(sys.argv[1:]) != 0:
    err('%s: no arguments expected.\n' % sys.argv[0])
    sys.exit(1)


cache = {}

def is_checked(f):
    return cache.get(f.id, 0)

def set_checked(f):
    cache[f.id] = 1


cwd = os.getcwd()
for f in state.files():
    if f.is_generated and f.read_stamp() != state.STAMP_MISSING:
        if deps.isdirty(f, depth='', max_changed=vars.RUNID,
                        already_checked=[],
                        is_checked=is_checked, set_checked=set_checked):
            print state.relpath(os.path.join(vars.BASE, f.name), cwd)