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-22-gb11508b
Date: Mon, 24 Apr 2023 13:25:08 +0000 (GMT)	[thread overview]
Message-ID: <20230424132508.3D5973858D1E@sourceware.org> (raw)




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

commit b11508bd0bd8fd43c68faaa8ac07f3304ff26393
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun Apr 23 15:06:59 2023 +0100

    Enhance fix-requires-by-path to match paths against a regex


Diff:
---
 calm/fix-requires-by-path.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/calm/fix-requires-by-path.py b/calm/fix-requires-by-path.py
index 19b2f71..31d86e7 100644
--- a/calm/fix-requires-by-path.py
+++ b/calm/fix-requires-by-path.py
@@ -63,7 +63,7 @@ def fix_one_hint(args, dirpath, hintfile, tf):
 
     try:
         with xtarfile.open(os.path.join(dirpath, tf), mode='r') as a:
-            ivp = any(m.startswith(args.path) for m in a.getnames())
+            ivp = any(re.match(args.path, m) for m in a.getnames())
     except tarfile.ReadError:
         pass
 
@@ -105,7 +105,7 @@ if __name__ == "__main__":
     relarea_default = common_constants.FTP
 
     parser = argparse.ArgumentParser(description='Add DEPATOM to requires: of packages which contain a file starting with PATH')
-    parser.add_argument('path', metavar='PATH', help='path to match')
+    parser.add_argument('path', metavar='PATH', help='regex of path to match')
     parser.add_argument('requires', metavar='DEPATOM', help='require to add')
     parser.add_argument('-v', '--verbose', action='count', dest='verbose', help='verbose output', default=0)
     parser.add_argument('--releasearea', action='store', metavar='DIR', help="release directory (default: " + relarea_default + ")", default=relarea_default, dest='relarea')


                 reply	other threads:[~2023-04-24 13:25 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=20230424132508.3D5973858D1E@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).