Exemplo n.º 1
0
def main(ns, rcpath):
    """Removes interfaces from the current fief selection."""
    selection = _magic.env_selection()
    selection -= set(ns.ifcs)
    env = {'FIEF_SELECTION': ' '.join(sorted(selection))}
    if ns.verbose:
        sys.stderr.write("current interface selection: " + ' '.join(selection) + '\n')
    _magic.exportvars(env)
    return 0
Exemplo n.º 2
0
def main(ns, config):
    """Adds interfaces to a fief selection."""
    selection = _magic.env_selection(config)
    selection |= set(ns.ifcs)
    env = {'FIEF_SELECTION': ' '.join(selection)}
    if ns.verbose:
        sys.stderr.write("current interface selection: " + ' '.join(selection) + '\n')
    _magic.exportvars(env)
    return 0
Exemplo n.º 3
0
 def top_a():
   oven = bake.Oven(bake.MemoHost(bake.FileHost_a), "oven")
   repo.Cmd.showout = ns.verbose
   pkgs = repos['packages']
   yield async.WaitFor(repo.init_a(oven, pkgs))
   fetch._init(pkgs)
   activated = _magic.env_selection(config)
   ans = yield async.WaitFor(deliver.deliver_a(oven, activated, ns.lazy))
   yield async.Result(ans)
Exemplo n.º 4
0
 def top_a():
   finst = yield async.Sync(fief.Fief.new_a(rcpath))
   activated = _magic.env_selection(finst)
   ifc2pkg, delv = yield async.Sync(deliver.deliver_a(finst, activated))
   
   ed = EnvDelta()
   for ifc in ifc2pkg:
     e = delv(ifc, 'envdelta')
     if e is not None:
       ed.merge(e)
   
   env = ed.apply(os.environ)
   env['FIEF_KNOWN_INTERFACES'] = " ".join(sorted(finst.repo.interfaces()))
   _magic.exportvars(env)  
Exemplo n.º 5
0
def main(ns, config):
    """Prints the current interface selection."""
    selection = _magic.env_selection(config)
    sys.stderr.write("current interface selection: " + ' '.join(selection) + '\n')
    exit(0)