pkglistgen: add sort reasonings in product_composer mode

Reasonings are really useful to understand why a package has been
pulled in. This commit adds those back in product_composer mode
and it matches the legacy behaviour.

Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
This commit is contained in:
Eugenio Paolantonio 2024-07-18 12:21:59 +02:00
parent 7404e0c697
commit ccbf8208d0

View File

@ -341,6 +341,8 @@ class Group(object):
self.logger.error(msg) self.logger.error(msg)
continue continue
content += f"{prefix} - {name}" content += f"{prefix} - {name}"
if name in packages and packages[name]:
content += f" # reason: {packages[name]}"
if comment: if comment:
content += f" # {comment}" content += f" # {comment}"
content += "\n" content += "\n"