예제 #1
0
파일: repo_cache.py 프로젝트: W3SS/koschei
 def make_url(self):
     arch = get_config('dependency.repo_arch')
     topurl = get_koji_config(self.koji_id, 'topurl')
     url = '{topurl}/repos/{build_tag}/{repo_id}/{arch}'
     return url.format(topurl=topurl,
                       build_tag=self.build_tag,
                       repo_id=self.repo_id,
                       arch=arch)
예제 #2
0
 def url(self):
     """
     Produce URL where the repo can be downloaded.
     """
     arch = get_config('dependency.repo_arch')
     topurl = get_koji_config(self.koji_id, 'topurl')
     url = '{topurl}/repos/{build_tag}/{repo_id}/{arch}'
     return url.format(topurl=topurl, build_tag=self.build_tag,
                       repo_id=self.repo_id, arch=arch)
예제 #3
0
 def url(self):
     """
     Produce URL where the repo can be downloaded.
     """
     arch = get_config('dependency.repo_arch')
     topurl = get_koji_config(self.koji_id, 'topurl')
     url = '{topurl}/repos/{build_tag}/{repo_id}/{arch}'
     return url.format(topurl=topurl,
                       build_tag=self.build_tag,
                       repo_id=self.repo_id,
                       arch=arch)
예제 #4
0
def repo_path(repo_id, repo_tag):
    arch = get_config('dependency.repo_arch')
    topurl = get_koji_config('primary', 'topurl')
    return f'{topurl}/repos/{repo_tag}/{repo_id}/{arch}'
예제 #5
0
config.load_config(['koschei.cfg'], ignore_env=True)

full_refs = config.get_config('full_refs')
default_ref = config.get_config('default_ref')
include_build_deps = config.get_config('include_build_deps')
api = config.get_config('api')
profiles = config.get_config('profiles')
includes = config.get_config('includes')
excludes = config.get_config('excludes')
frozen_refs = config.get_config('frozen_refs')
stream_override = config.get_config('stream_override')
macros = config.get_config('macros', None)

ks = koji_util.KojiSession()

tag_name = config.get_koji_config('primary', 'tag_name')
repo_id = ks.getRepo(tag_name, state=koji.REPO_READY)['id']
repo_descriptor = KojiRepoDescriptor('primary', tag_name, repo_id)


# Parse RPM name - split it into NVRA dict
def parse_nvra(str):
    m = re.match(r'^(.+)-([^-]+)-([^-]+)\.([^-.]+).rpm$', str)
    return {'name': m.group(1), 'version': m.group(2),
            'release': m.group(3), 'arch': m.group(4)}


# Get RPM name
def name(rpm):
    return parse_nvra(rpm)['name']
예제 #6
0
파일: forms.py 프로젝트: msimacek/koschei
 def __call__(self, _, field):
     allowed = get_koji_config('primary', 'build_arches')
     for arch in field.data:
         match = arch_override_re.match(arch)
         if not match or match.group(1) not in allowed:
             raise ValidationError("Unrecognized arch in arch_override")
예제 #7
0
 def __call__(self, _, field):
     allowed = get_koji_config('primary', 'build_arches')
     for arch in field.data:
         match = arch_override_re.match(arch)
         if not match or match.group(1) not in allowed:
             raise ValidationError("Unrecognized arch in arch_override")
예제 #8
0
파일: repo_cache.py 프로젝트: W3SS/koschei
 def make_url(self):
     arch = get_config('dependency.repo_arch')
     topurl = get_koji_config(self.koji_id, 'topurl')
     url = '{topurl}/repos/{build_tag}/{repo_id}/{arch}'
     return url.format(topurl=topurl, build_tag=self.build_tag,
                       repo_id=self.repo_id, arch=arch)