[elbe-devel] [PATCH] elbepack: dump: group installed packages by origin

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Jun 25 13:42:13 CEST 2024


Now that we have the actual "Origin:" field from the repository itself
available, use it to replace the hardcoded site-based mapping.
This works also in the face of mirrors and proxies.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/dump.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/elbepack/dump.py b/elbepack/dump.py
index 905221234170..c277193f7975 100644
--- a/elbepack/dump.py
+++ b/elbepack/dump.py
@@ -202,12 +202,7 @@ def elbe_report(xml, buildenv, cache, targetfs):
 
     groups = collections.defaultdict(list)
     for p in instpkgs:
-        o = p.origin.site
-        if o.endswith('.debian.org'):
-            # Group upstream packages together.
-            o = 'Debian'
-
-        groups[o].append(p)
+        groups[p.origin.origin].append(p)
 
     # Sort alphabetically, 'Debian' last.
     for origin, pkgs in sorted(groups.items(), key=lambda x: (x[0] == 'Debian', x[0])):

---
base-commit: 5e13aae432f52800439432fea4ab429eb6c7c724
change-id: 20240625-pkg-origin-9df9dc70f6f0

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh at linutronix.de>



More information about the elbe-devel mailing list