def __init__(self, source_name=None, source_path=None, verbose=1, config=None): ctx = poldek.poldek_ctx() self._cb = PyldekCallbacks() self._progress = vfileProgress() ctx.set_callbacks(self._cb) ctx.set_vfile_progress(self._progress) ctx.set_verbose(verbose) src = None if source_name: # -n source_name ? print "## Configured %s" % source_name src = poldek.source(source_name) ctx.configure(ctx.CONF_SOURCE, src) if source_path: # -s source_name ? print "## Configured %s" % source_path src = poldek.source(None, None, source_path, None) ctx.configure(ctx.CONF_SOURCE, src) ctx.load_config() if not ctx.setup(): raise RuntimeError, "poldek setup failed" self.ctx = ctx self.cctx = poldek.poclidek_ctx(ctx)
def __init__(self, source_name = None, source_path = None, verbose = 1, config = None): ctx = poldek.poldek_ctx() self._cb = PyldekCallbacks() self._progress = vfileProgress() ctx.set_callbacks(self._cb) ctx.set_vfile_progress(self._progress) ctx.set_verbose(verbose) src = None if source_name: # -n source_name ? print "## Configured %s" % source_name src = poldek.source(source_name) ctx.configure(ctx.CONF_SOURCE, src) if source_path: # -s source_name ? print "## Configured %s" % source_path src = poldek.source(None, None, source_path, None) ctx.configure(ctx.CONF_SOURCE, src) ctx.load_config() if not ctx.setup(): raise RuntimeError, "poldek setup failed" self.ctx = ctx self.cctx = poldek.poclidek_ctx(ctx)
def __init__(self): ctx = poldek.poldek_ctx() ctx.load_config() if not ctx.setup(): raise RuntimeError, "poldek setup failed" self.ctx = ctx self.cctx = poldek.poclidek_ctx(ctx)
def __init__(self): '''Prepare poldek config and repositories''' self.ctx = poldek.poldek_ctx() self.cctx = poldek.poclidek_ctx(self.ctx) self.ctx.load_config() try: self.ctx.setup() except: sys.exit(_('Poldek setup error.')) self.load_packages()