def update_repos(self, repos): if repos == 'debian': basedir = path(config.get('repos_debian', 'basedir')) elif repos == 'security': basedir = path(config.get('repos_security', 'basedir')) else: msg = "%s not a valid repository" % repos raise RuntimeError , msg self.repos.set_basedir(basedir) ready = self.is_process_ready() if not ready: raise RuntimeError , "repos process not ready" self.repos.update() return True
import os import subprocess from debrepos.repos import RepRepRo from debrepos.build import MainBuilder from debrepos.base import parse_dsc_filename from debrepos.base import get_filenames_with_dcmd from debrepos.config import config DEBIAN_BASEDIR = config.get('repos_debian', 'basedir') LOCAL_BASEDIR = config.get('repos_local', 'basedir') class MainManager(object): def __init__(self): self.builder = MainBuilder(user='******') self.debian_repos = RepRepRo(basedir=DEBIAN_BASEDIR) self.local_repos = RepRepRo(basedir=LOCAL_BASEDIR) self.srcbuild_opts = ['-S', '-sa', '-us', '-uc'] def staging_dir(self, dscfile): source, version = parse_dsc_filename(dscfile) return source def get_dscfile_from_changes(self, changes): dscfile = '' filenames = get_filenames_with_dcmd(changes) for filename in filenames: if filename.endswith('.dsc'): if not dscfile:
def __init__(self): self.baseparent = path(config.get('main', 'homedir')) self.repos = RepRepRo()