From c5dfc01c3dc5347eb025c9f8739df42a45a98fba Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sun, 30 Aug 2020 09:03:08 +0200 Subject: [PATCH] new: show partially missing packages --- app/web.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/web.py b/app/web.py index 89c32f3..a126290 100644 --- a/app/web.py +++ b/app/web.py @@ -296,10 +296,16 @@ async def new(request: Request, response: Response) -> Response: for srcinfo in state.sourceinfos.values(): if package_name_is_vcs(srcinfo.pkgbase): continue - available[srcinfo.pkgbase] = srcinfo + available[srcinfo.pkgname] = srcinfo for s in state.sources.values(): - available.pop(s.name, None) - new = list(available.values()) + for p in s.packages.values(): + available.pop(p.name, None) + + # only one per pkgbase + grouped = {} + for srcinfo in available.values(): + grouped[srcinfo.pkgbase] = srcinfo + new = list(grouped.values()) new.sort( key=lambda i: (i.date, i.pkgbase, i.pkgname),