public inbox for cygwin-apps-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jon Turney <jturney@sourceware.org>
To: cygwin-apps-cvs@sourceware.org
Subject: [calm - Cygwin server-side packaging maintenance script] branch master, updated. 20230209-54-g6103afd
Date: Tue,  2 Jan 2024 12:27:56 +0000 (GMT)	[thread overview]
Message-ID: <20240102122756.BC11E3858CDA@sourceware.org> (raw)




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

commit 6103afd483abd1bd482eeaa00e999e6fe1a9ca2a
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Fri Dec 29 14:34:44 2023 +0000

    Add package recipe URL to JSON dump


Diff:
---
 calm/package.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/calm/package.py b/calm/package.py
index dd46b57..d135d80 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1392,6 +1392,20 @@ def upper_first_character(s):
     return s[:1].upper() + s[1:]
 
 
+#
+#
+#
+
+def _find_build_recipe_file(pn):
+    repo = '/git/cygwin-packages/%s.git' % pn
+    if os.path.exists(repo):
+        # XXX: we might want to check contents of the repo to determine if this
+        # package has a cygport or g-b-s build script
+        return 'https://cygwin.com/cgit/cygwin-packages/%s/tree/%s.cygport' % (pn, pn)
+
+    return None
+
+
 #
 # write a json summary of packages
 #
@@ -1443,6 +1457,10 @@ def write_repo_json(args, packages, f):
         if 'license' in po.version_hints[bv]:
             d['license'] = po.version_hints[bv]['license']
 
+        build_recipe = _find_build_recipe_file(po.orig_name)
+        if build_recipe:
+            d['build_recipe'] = build_recipe
+
         if (po.orig_name in pkg_maintainers) and (not pkg_maintainers[po.orig_name].is_orphaned()):
             d['maintainers'] = sorted(pkg_maintainers[po.orig_name].maintainers())
 


                 reply	other threads:[~2024-01-02 12:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240102122756.BC11E3858CDA@sourceware.org \
    --to=jturney@sourceware.org \
    --cc=cygwin-apps-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).