def execute_plan(plan, index=None, verbose=False): if verbose: from conda.console import setup_verbose_handlers setup_verbose_handlers() # set default prefix prefix = config.root_dir i = None cmds = cmds_from_plan(plan) for cmd, arg in cmds: if i is not None and cmd in progress_cmds: i += 1 getLogger('progress.update').info((install.name_dist(arg), i)) if cmd == PREFIX: prefix = arg elif cmd == PRINT: getLogger('print').info(arg) elif cmd == FETCH: fetch(index, arg) elif cmd == PROGRESS: i = 0 maxval = int(arg) getLogger('progress.start').info(maxval) elif cmd == EXTRACT: install.extract(config.pkgs_dirs[0], arg) elif cmd == RM_EXTRACTED: install.rm_extracted(config.pkgs_dirs[0], arg) elif cmd == RM_FETCHED: install.rm_fetched(config.pkgs_dirs[0], arg) elif cmd == LINK: link(prefix, arg) elif cmd == UNLINK: install.unlink(prefix, arg) elif cmd == SYMLINK_CONDA: install.symlink_conda(prefix, arg) else: raise Exception("Did not expect command: %r" % cmd) if i is not None and cmd in progress_cmds and maxval == i: i = None getLogger('progress.stop').info(None) install.messages(prefix)
def execute_plan(plan, index=None, verbose=False): if verbose: from conda.console import setup_verbose_handlers setup_verbose_handlers() # set default prefix prefix = config.root_dir i = None cmds = cmds_from_plan(plan) for cmd, arg in cmds: if i is not None and cmd in progress_cmds: i += 1 getLogger('progress.update').info((install.name_dist(arg), i)) if cmd == PREFIX: prefix = arg elif cmd == PRINT: getLogger('print').info(arg) elif cmd == FETCH: fetch(index, arg) elif cmd == PROGRESS: i = 0 maxval = int(arg) getLogger('progress.start').info(maxval) elif cmd == EXTRACT: install.extract(config.pkgs_dirs[0], arg) elif cmd == RM_EXTRACTED: install.rm_extracted(config.pkgs_dirs[0], arg) elif cmd == RM_FETCHED: install.rm_fetched(config.pkgs_dirs[0], arg) elif cmd == LINK: link(prefix, arg, index=index) elif cmd == UNLINK: install.unlink(prefix, arg) elif cmd == SYMLINK_CONDA: install.symlink_conda(prefix, arg) else: raise Exception("Did not expect command: %r" % cmd) if i is not None and cmd in progress_cmds and maxval == i: i = None getLogger('progress.stop').info(None) install.messages(prefix)
def RM_EXTRACTED_CMD(state, arg): install.rm_extracted(config.pkgs_dirs[0], arg)
def RM_EXTRACTED_CMD(state, arg): install.rm_extracted(arg)