commit:     e9f38cd0ce2b1eda130634f8569f5521c2c6511d
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Fri May 31 11:13:08 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Fri May 31 11:13:08 2024 +0000
URL:        
https://gitweb.gentoo.org/proj/pkgcore/pkgdev.git/commit/?id=e9f38cd0

mask: support comma separated bugs

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 src/pkgdev/scripts/pkgdev_mask.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pkgdev/scripts/pkgdev_mask.py 
b/src/pkgdev/scripts/pkgdev_mask.py
index 041eef1..1d614a0 100644
--- a/src/pkgdev/scripts/pkgdev_mask.py
+++ b/src/pkgdev/scripts/pkgdev_mask.py
@@ -61,9 +61,10 @@ mask_opts.add_argument(
 mask_opts.add_argument(
     "-b",
     "--bug",
+    "--bugs",
     dest="bugs",
-    action="append",
-    type=arghparse.positive_int,
+    action=arghparse.CommaSeparatedValuesAppend,
+    default=[],
     help="reference bug in the mask comment",
     docs="""
         Add a reference to a bug in the mask comment. May be specified multiple
@@ -100,6 +101,8 @@ def _mask_validate(parser, namespace):
     atoms = set()
     maintainers = set()
 
+    namespace.bugs = list(map(int, dict.fromkeys(namespace.bugs)))
+
     if not namespace.rites and namespace.file_bug:
         mask.error("bug filing requires last rites")
     if namespace.file_bug and not namespace.api_key:

Reply via email to