From: Jon Turney <jon.turney@dronecode.org.uk>
To: "cygwin-apps@cygwin.com" <cygwin-apps@cygwin.com>
Subject: Re: git repositories for cygwin packaging - please test
Date: Sun, 25 Oct 2020 18:10:49 +0000 [thread overview]
Message-ID: <d39605e3-84c8-8009-5185-d85a3d5d649d@dronecode.org.uk> (raw)
In-Reply-To: <878scms2wh.fsf@Rainer.invalid>
On 04/10/2020 11:26, Achim Gratz wrote:
> ASSI writes:
>> SCALLYWAG="notest"
>
> It seems that if I write something like
>
> SCALLYWAG="notest" # a comment
>
> then the line actually gets ignored due to a somewhat restrictive regex:
>
> match = re.search(r'^\s*SCALLYWAG=\s*"?(.*?)"?$', content, re.MULTILINE)
>
> Something like this might work better:
>
> match = re.search(r'^\s*SCALLYWAG=\s*"?(.*?)"?(\s*#.*)?$', content, re.MULTILINE)
>
> (I hope :-). Otherwise you'd first need to chop off any comments at the
> end and then shove the result into the original regex.
>
> It seems like there is a lot of ad-hoc code in that file that does
> things slightly differently for various settings, so that seems like it
> should get re-factored into something more general that is used
> uniformly across all the things you want to extract from the cygport
> file.
As noted elsewhere, trying to parse variables out of the .cygport like
this isn't a good approach, and really I want to add something which
gets cygport to execute the file and then output the variables of interest.
But I've tweaked things a bit so comments should get discarded before we
start looking at the file contents, which hopefully helps this a bit.
next prev parent reply other threads:[~2020-11-06 13:53 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-04 20:08 Jon Turney
2019-08-05 2:03 ` Ken Brown
2019-08-08 13:47 ` Andrew Schulman via cygwin-apps
2019-08-08 14:04 ` Andrew Schulman via cygwin-apps
2019-08-08 17:09 ` Ken Brown
2019-08-09 16:12 ` Jon Turney
2019-08-09 19:12 ` Ken Brown
2019-08-13 11:55 ` Jon Turney
2019-08-09 16:00 ` Jon Turney
2019-08-09 20:58 ` Brian Inglis
2019-08-13 11:55 ` Jon Turney
2019-08-19 18:36 ` Achim Gratz
2020-05-27 22:27 ` Jon Turney
2020-05-28 11:51 ` szgyg
2020-06-04 16:01 ` Ken Brown
2020-06-04 20:33 ` Brian Inglis
2020-06-09 13:26 ` Jon Turney
2020-06-09 22:44 ` Brian Inglis
2020-08-06 20:20 ` Jon Turney
2020-08-06 21:04 ` Ken Brown
2020-08-07 19:42 ` Achim Gratz
2020-08-07 22:05 ` Ken Brown
2020-08-08 4:26 ` ASSI
2020-08-16 18:05 ` Jon Turney
2020-08-23 21:01 ` Jon Turney
2020-08-26 22:00 ` Ken Brown
2020-08-30 15:00 ` Jon Turney
2020-08-30 15:22 ` Ken Brown
2020-08-30 15:46 ` Jon Turney
2020-08-30 17:25 ` Ken Brown
2020-08-30 20:06 ` Jon Turney
2020-11-12 21:30 ` Jon Turney
2020-08-30 16:44 ` ASSI
2020-08-30 20:08 ` Jon Turney
2020-10-04 10:26 ` Achim Gratz
2020-10-25 18:10 ` Jon Turney [this message]
2021-05-09 14:39 ` Jon Turney
2021-06-22 19:52 ` Jon Turney
2021-06-23 4:22 ` Brian Inglis
2022-07-05 13:12 ` Jon Turney
2023-02-18 16:21 ` Jon Turney
2023-02-18 17:43 ` Ken Brown
2023-02-18 18:40 ` Jon Turney
2020-11-16 21:54 ` Brian Inglis
2020-11-16 22:16 ` Jon Turney
2020-11-16 22:54 ` Brian Inglis
2020-11-17 19:21 ` Achim Gratz
2020-05-29 14:40 ` Alexey Sokolov
2020-06-07 15:06 ` Hamish McIntyre-Bhatty
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=d39605e3-84c8-8009-5185-d85a3d5d649d@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/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).