[RFC] calm, setup: per-version requires

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[RFC] calm, setup: per-version requires

Achim Gratz

With the possibility of having more than three versions in setup.ini and
per-version hint files, the need for per-version requires is getting
more urgent.  Currently the requires from the corresponding hint files
get merged, which leads to abominations like these (from mosh):

requires: … libprotobuf13 libprotobuf14 libprotobuf8 …

I suggest that the current requires: line is kept to contain the
intersection of all hint files and an additional requires: line in each
version group lists the relative complement of the corresponding hint
file and the non-versioned requires: line.  It may be necessary to
rename the requires: token to something else in order to ease parsing,
maybe something like requires+: to show that these are in addition to
the usual requires: line?


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] calm, setup: per-version requires

Jon TURNEY
On 05/11/2017 07:34, Achim Gratz wrote:
> With the possibility of having more than three versions in setup.ini and
> per-version hint files, the need for per-version requires is getting
> more urgent.  Currently the requires from the corresponding hint files

Since it's been needed since ~2000, it could hardly be less urgent :)

> get merged, which leads to abominations like these (from mosh):
>
> requires: … libprotobuf13 libprotobuf14 libprotobuf8 …
>
> I suggest that the current requires: line is kept to contain the
> intersection of all hint files and an additional requires: line in each
> version group lists the relative complement of the corresponding hint
> file and the non-versioned requires: line.  It may be necessary to

Yeah, I guess we could generate requires: line in each version section
now, and this might work with current setup.  I don't think this did
anything useful prior to [1] being fixed.

[1]
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/setup.git;a=commitdiff;h=78e4c7d7c8be4698d362d204aacfe701f6503359;hp=60b4f6caa5c0bcadaf304620a31e37f77f56b9bf

> rename the requires: token to something else in order to ease parsing,
> maybe something like requires+: to show that these are in addition to
> the usual requires: line?
The libsolv branch implements per-version '[dD]epends:' headers as per
[2] (which may also contain a version relation)

[2] https://sourceware.org/cygwin-apps/setup.ini.html
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] calm, setup: per-version requires

Achim Gratz
Jon Turney writes:
> On 05/11/2017 07:34, Achim Gratz wrote:
>> With the possibility of having more than three versions in setup.ini and
>> per-version hint files, the need for per-version requires is getting
>> more urgent.  Currently the requires from the corresponding hint files
>
> Since it's been needed since ~2000, it could hardly be less urgent :)

I've been chasing a few extra packages that got pulled into my
installation that I didn't think should be pulled in.  These aren't very
many apparently, but unfortunately quite large ones are among them.

> Yeah, I guess we could generate requires: line in each version section
> now, and this might work with current setup.  I don't think this did
> anything useful prior to [1] being fixed.

Yes, and even though I think the parser would accept them they weren't
really expected anyway.

> The libsolv branch implements per-version '[dD]epends:' headers as per
> [2] (which may also contain a version relation)

I'd really prefer we'd come up with a solution that does not have us
repeat the common dependencies for each version present.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] calm, setup: per-version requires

Jon TURNEY
On 09/11/2017 18:18, Achim Gratz wrote:

> Jon Turney writes:
>> On 05/11/2017 07:34, Achim Gratz wrote:
>> Yeah, I guess we could generate requires: line in each version section
>> now, and this might work with current setup.  I don't think this did
>> anything useful prior to [1] being fixed.
>
> Yes, and even though I think the parser would accept them they weren't
> really expected anyway.
>
>> The libsolv branch implements per-version '[dD]epends:' headers as per
>> [2] (which may also contain a version relation)
>
> I'd really prefer we'd come up with a solution that does not have us
> repeat the common dependencies for each version present.

My current plan is to do the simplest thing:
- requires: remains the union of dependencies
- if the version has a depends: hint, use that for depends: (not
something cygport is currently capable of generating)
- otherwise, generate depends: from the requires: hint for the version


It's probably useful to bear in mind how various versions of setup will
behave if I was to turn on 'depends:' generation in calm.  From staring
at the code (so subject to testing), I think it breaks down as follows:

prior to 2.880:  Will ignore 'depends:', so 'requires:' needs to remain
the union of dependencies for the benefit of these versions of setup.

2.880 onwards: The curr: version will get the union of 'depends:' and
'requires:', other versions will get 'requires:'.

The prereq checker checks that the dependencies are satisfied (including
any version relation), but then installs the 'curr:' or 'test:' version
(depending on chooser preference) imagining that will satisfy it.

libsolv-based: 'depends:' supersedes 'requires:', installs the right
right thing (hopefully :))
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] calm, setup: per-version requires

Achim Gratz
Jon Turney writes:
> prior to 2.880:  Will ignore 'depends:', so 'requires:' needs to
> remain the union of dependencies for the benefit of these versions of
> setup.

If you want to maintain backwards compatibility.  I am still sitting on
the fence on that, but I currently lean to propose a clean cut and
producing a setup.ini file for backwards compatibility for some time in
parallel with some new file that uses the new syntax only.

> 2.880 onwards: The curr: version will get the union of 'depends:' and
> 'requires:', other versions will get 'requires:'.

That doesn't make any sense, since the requires would be the union of
all depends already.  So, 2.880+ should ignore the requires: and use the
union of [curr] and any version specific depends:.  But maybe I
misunderstood what you want to be doing.

> The prereq checker checks that the dependencies are satisfied
> (including any version relation), but then installs the 'curr:' or
> 'test:' version (depending on chooser preference) imagining that will
> satisfy it.
>
> libsolv-based: 'depends:' supersedes 'requires:', installs the right
> right thing (hopefully :))

Wait…  I thought libsolve-based was 2.880+?

Again the note that the libsolve-based setup.ini format should include a
way to provides: a named feature that other packages can then depends:
on.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs
Reply | Threaded
Open this post in threaded view
|

Re: [RFC] calm, setup: per-version requires

Jon TURNEY
On 05/12/2017 18:14, Achim Gratz wrote:
> Jon Turney writes:
>> 2.880 onwards: The curr: version will get the union of 'depends:' and
>> 'requires:', other versions will get 'requires:'.

Actually it's worse than that, it just concatenates requires: and any
depends: lines, applying the current concatenated list to each version,
as it seen (fixed as of 2.883)

> That doesn't make any sense, since the requires would be the union of
> all depends already.  So, 2.880+ should ignore the requires: and use the
> union of [curr] and any version specific depends:.  But maybe I
> misunderstood what you want to be doing.

These are lists, not sets, so can (and will, in this scenario) contain
duplicates.

>> The prereq checker checks that the dependencies are satisfied
>> (including any version relation), but then installs the 'curr:' or
>> 'test:' version (depending on chooser preference) imagining that will
>> satisfy it.
>>
>> libsolv-based: 'depends:' supersedes 'requires:', installs the right
>> right thing (hopefully :))
>
> Wait…  I thought libsolve-based was 2.880+?

I don't know what could have given you that idea. It's not released yet.