git repositories for cygwin packaging - please test

Jon Turney
Sun Oct 25 18:10:49 GMT 2020

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 ='^\s*SCALLYWAG=\s*"?(.*?)"?$', content, re.MULTILINE)
> Something like this might work better:
> match ='^\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.

More information about the Cygwin-apps mailing list