Re: Using 'Source:' in setup.ini (was Re: [PATCH setup v2] add --build-depend option)
Jon Turney via Cygwin-apps <[email protected]> Sun, 5 Apr 2026 13:17:57 +0100
| Newsgroups | gmane.os.cygwin.applications |
|---|---|
| Message-ID | <[email protected]> |
On 08/03/2026 13:36, ASSI via Cygwin-apps wrote: > Jon Turney via Cygwin-apps writes: > […] >> This syntax has been accepted by setup for a long time, but we've >> never made the switch to using it. >> >> Last time I raised this, there were some vague concerns, I think >> around ensuring other tools could extract the data they want from the >> manifest in a single-pass (which is not guaranteed, but perhaps could >> be by ordering packages correctly). > > Compatibility with existing tooling is always a concern and there will > unavoidably be some that just don't understand this syntax until they > get updated. But I think emitting the source package before any of its > productions should resolve any dependency problems in single-pass > parsers (like ordering the versions in a certain way did for another > such problem). A transition period where both forms are emitted might > be advisable as well. Sigh, yes, I suppose so... I guess I need to go and find out what setup does when both 'source' and 'srcpkg' lines are present... > However what bugs me about his particular syntax is using the same word > for different things, just distinguished by capital and lowercase > initial (and I'm used to that sort of thing…). Could we use "srcpkg" > instead? Given that the whole thing wasn't used until now we could > still change it? In fact given the current description of the "Source:" > key we probably should rename the key if we are going to have a > transition period with both items present. Yeah, having two different tokens which only differ in case is not good. diff --git a/inilex.ll b/inilex.ll index 8ee92935..40f8c5ba 100644 --- a/inilex.ll +++ b/inilex.ll @@ -118,7 +118,7 @@ B64 [a-zA-Z0-9_-] "sdesc:" return SDESC; "ldesc:" return LDESC; "message:" return MESSAGE; -"Source:" return SOURCEPACKAGE; +"srcpkg:"|"Source:" return SOURCEPACKAGE; [bB]"uild-"[dD]"epends:" return BUILDDEPENDS; "replace-versions:" return REPLACE_VERSIONS;