예제 #1
0
    def _installContents(self, root, troves):
        cfg = copy.deepcopy(self._cfg)
        cfg.root = root
        cfg.autoResolve = False
        cfg.updateThreshold = 0

        cli = ConaryClient(cfg)
        try:
            self._log.debug("Preparing update job")
            job = cli.newUpdateJob()
            jobList = [(x[0], (None, None), (x[1], x[2]), True)
                    for x in troves]
            cli.prepareUpdateJob(job, jobList, resolveDeps=False)

            self._log.debug("Applying update job")
            cli.applyUpdateJob(job, noScripts = True)

        finally:
            job = None
            cli.close()