repos: Update summary formatting for recursive report

- distingush new packages ('+') from updated ('u');
- wider field for SRPM.
This commit is contained in:
Ivan A. Melnikov 2023-08-02 15:01:15 +04:00
parent 47bac38aa8
commit 5216695457

View File

@ -428,10 +428,21 @@ def recursive_build_report(from_repo, to_repo, *source_names,
else:
break
def letter(source):
if source in requested_source_names:
return ' '
to_source = to_repo.sources.get(source)
if not to_source:
return '+' # new
from_source = from_repo.sources.get(source)
if not from_source:
return '?'
return 'u'
reports.append('\n== SUMMARY ==\n')
for source in order:
reports.append('{}\t{:50} {} :: {}'.format(
'' if source in requested_source_names else 'N',
reports.append('{} {:60} {} :: {}'.format(
letter(source),
from_repo.sources[source].source_rpm.decode(),
b' '.join(build_source_deps[source]).decode(),
b' '.join(pkg_source_deps[source]).decode()))