Commit 1b5d1a10 authored by Emanuele Aina's avatar Emanuele Aina Committed by Peter Senna Tschudin

installability: Print missing dependencies

List the missing packages and the packages they break. This provides a quickly
actionable data point, since it gives an indication of what needs to be added
and how many packages it would fix.
Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 9ab8d8f6
......@@ -155,6 +155,7 @@ def main():
for arch in ARCHES:
packages.update(check_packages_repository(args.release, args.whitelists_dir, arch, args.fg, args.bg))
print('\n## Broken packages')
for repository, results in packages.items():
report = results['report'] or []
broken = [p for p in report if p['status'] == 'broken']
......@@ -162,6 +163,20 @@ def main():
for r in broken:
print(f" {r['package']} ({r['version']}/{r['architecture']})")
print('\n## Missing dependencies')
for repository, results in packages.items():
report = results['report'] or []
broken = [p for p in report if p['status'] == 'broken']
missing = {}
for pkg in broken:
reasons = [r for r in pkg['reasons'] if 'missing' in r]
for reason in reasons:
dep = reason['missing']['pkg']['unsat-dependency']
missing.setdefault(dep, []).append(pkg['package'])
print(f'{args.release}/{repository} missing:{len(missing)}')
for pkg, rdeps in missing.items():
print(f' {pkg} breaking:{len(rdeps)} {rdeps}')
if args.junit:
args.junit.write(render_junit(packages))
......
Markdown is supported
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