Commit 2a710d20 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Add aggregates for all repos, not just active ones

parent 1a662193
Pipeline #67012 passed with stage
in 16 seconds
......@@ -80,17 +80,6 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
projects = [p for p in osc.core.meta_get_project_list(apiurl)
if p.startswith("software") and not (p == "software:dist" or p == "software:images")]
def active_repos(project):
lines = map(mpcdf_common.decode_it, osc.core.show_project_conf(apiurl, project))
for line in lines:
if line == mpcdf_common.prjconf_start_marker:
for line in lines:
if line == mpcdf_common.prjconf_end_marker:
if line.startswith("%if %_repository == "):
yield line.split(" == ")[1].rstrip()
macros = {}
for project in projects:
if project == "software":
......@@ -105,7 +94,7 @@ def do_mpcdf_refresh_aggregates(self, subcmd, opts, *args):
values = mpcdf_common.get_attribute_values(apiurl, project, None, attribute)
macros[target].append("%available_{0} {1}".format(name, ",".join(sorted(values))))
for repo in active_repos(project):
for repo in osc.core.get_repositories_of_project(apiurl, project):
aggregatename = "zz_aggregate_" + project.replace(":", "-") + "_" + repo
refresh_aggregate(aggregatename, project, repo, target)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment