[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-6-g6e142a4

Jon Turney jturney@sourceware.org
Sun Feb 12 18:38:25 GMT 2023




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=6e142a496f3cd0f3cd76cd56091d190800b873fa

commit 6e142a496f3cd0f3cd76cd56091d190800b873fa
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Feb 12 17:59:50 2023 +0000

    Fix mkgitolite for maintainers rewrite
    
    Keep maintainers in a list, not a set, because we need "first named
    maintainer".


Diff:
---
 calm/maintainers.py    | 4 ++--
 calm/mkgitoliteconf.py | 8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/calm/maintainers.py b/calm/maintainers.py
index f9ef734..cc75040 100644
--- a/calm/maintainers.py
+++ b/calm/maintainers.py
@@ -188,7 +188,7 @@ def _read_pkglist(pkglist):
                     m = rest
 
                 # joint maintainers are separated by '/'
-                maintainers = set()
+                maintainers = list()
                 for name in m.split('/'):
                     name = name.strip()
 
@@ -202,7 +202,7 @@ def _read_pkglist(pkglist):
                         logging.error("non-ascii maintainer name '%s' in line %s:%d, skipped" % (rest, pkglist, i))
                         continue
 
-                    maintainers.add(name)
+                    maintainers.append(name)
 
                 mpkgs[pkg] = MaintainerPackage(pkg, maintainers, orphaned)
 
diff --git a/calm/mkgitoliteconf.py b/calm/mkgitoliteconf.py
index b75b4bb..3b8ab73 100755
--- a/calm/mkgitoliteconf.py
+++ b/calm/mkgitoliteconf.py
@@ -75,10 +75,12 @@ def do_main(args):
 
     # for each package
     for p in sorted(pkgs):
-        users = ' '.join(map(transform_username, pkgs[p]))
-        owner = pkgs[p][0]  # first named maintainer
+        pkg = pkgs[p]
 
-        if p.is_orphaned():
+        users = ' '.join(map(transform_username, [m for m in pkg.maintainers() if m != 'ORPHANED']))
+        owner = pkg.maintainers()[0]  # first named maintainer
+
+        if pkg.is_orphaned():
             owner = 'ORPHANED'
 
         print("repo git/cygwin-packages/%s" % (p))



More information about the Cygwin-apps-cvs mailing list