Make external repo URL prefix configurable

Not both Fedora and internal Brew uses config topurl as the external
repo's URL prefix. Hence, make it configurable to fulfill this
difference.

Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
Chenxiong Qi
2018-10-31 16:41:21 +08:00
parent 917c06ad0c
commit 5d3ea762c6
3 changed files with 46 additions and 37 deletions

View File

@@ -64,7 +64,7 @@ def find_build_tags_from_external_repos(koji_session, repo_infos):
:rtype: list[str]
"""
re_external_repo_url = r'^{}/repos/(.+-build)/latest/\$arch/?$'.format(
koji_session.opts['topurl'].rstrip('/'))
conf.koji_external_repo_url_prefix.rstrip('/'))
tag_names = []
for info in repo_infos:
om = re.match(re_external_repo_url, info['url'])