public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
* [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-6-g6e142a4
@ 2023-02-12 18:38 Jon Turney
  0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2023-02-12 18:38 UTC (permalink / raw)
  To: cygwin-apps-cvs




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))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-12 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 18:38 [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-6-g6e142a4 Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).