Skip to content

Commit

Permalink
WIP a start at fixes to use actual un-mangled name:stream, still more…
Browse files Browse the repository at this point in the history
… to do
  • Loading branch information
mmathesius committed Mar 29, 2021
1 parent 91cacde commit 50da415
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions lib/distrobaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,9 @@ def process_components(compset):
if "main" not in c:
logger.critical("DistroBaker is not configured, aborting.")
return None
# TODO: more work needs to be done here for modules to make sure we are
# always using the actual un-mangled name:stream, and sorting out the
# latest nvr for each name:stream
if not compset:
logger.debug(
"No components selected, gathering components from triggers."
Expand All @@ -1286,13 +1289,25 @@ def process_components(compset):
)
# Note: querying tagged modules with latest=True only returns the
# latest module tagged for any stream, so we need need to query all
# and let set uniqueness eliminate duplicates
compset.update(
"{}/{}:{}".format("modules", x["package_name"], x["version"])
for x in get_buildsys("source").listTagged(
c["main"]["trigger"]["modules"],
# and let set uniqueness eliminate duplicates.
# This also fetches the un-mangled name:stream for each module.
for x in get_buildsys("source").listTagged(
c["main"]["trigger"]["modules"],
):
binfo = get_build_info(x["nvr"])
if (
binfo is None
or binfo["name"] is None
or binfo["stream"] is None
):
logger.error(
"Could not get module info for %s, skipping.",
x["nvr"],
)
continue
compset.update(
"{}/{}:{}".format("modules", binfo["name"], binfo["stream"])
)
)
logger.info("Processing %d component(s).", len(compset))
processed = 0
for rec in sorted(compset, key=str.lower):
Expand Down

0 comments on commit 50da415

Please sign in to comment.