Skip to content
Snippets Groups Projects
Commit 2a710d20 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Add aggregates for all repos, not just active ones

parent 1a662193
No related branches found
No related tags found
No related merge requests found
Pipeline #67012 passed
......@@ -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:
break
for line in lines:
if line == mpcdf_common.prjconf_end_marker:
break
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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment