From 9f11e383221342c200a8d1b2f817a8aa3ab5a5db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= <dev@stellardeath.org>
Date: Mon, 30 Sep 2024 11:43:17 +0200
Subject: [PATCH] Make list of packages optional in mpcdf_info

---
 mpcdf_info.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/mpcdf_info.py b/mpcdf_info.py
index f383a32..169ccbc 100644
--- a/mpcdf_info.py
+++ b/mpcdf_info.py
@@ -9,7 +9,9 @@ import osc.core
 import osc.cmdln
 
 
-def do_mpcdf_info(self, subcmd, opts, *args):
+@osc.cmdln.option('-d', '--details', action="store_true",
+                  help='Print details about each package as well')
+def do_mpcdf_info(self, subcmd, opts, *args) -> None:
     """mpcdf_info:
     Basic information about an MPCDF OBS project
 
@@ -46,6 +48,9 @@ def do_mpcdf_info(self, subcmd, opts, *args):
     print_attribute("ROCm versions", "MPCDF:rocm_modules")
     print_attribute("PGI compilers", "MPCDF:pgi_modules")
 
+    if not opts.details:
+        raise SystemExit(0)
+
     unmanaged = []
 
     packages = osc.core.meta_get_packagelist(api_url, project)
-- 
GitLab