[Rpm-ecosystem] Rich deps syntax finalization

Pat Riehecky riehecky at fnal.gov
Tue Aug 25 16:06:51 UTC 2015



On 08/25/2015 10:54 AM, Pavel Odvody wrote:
> On Tue, 2015-08-25 at 14:11 +0200, Florian Festi wrote:
>> >Hi!
>> >
>> >I have been visiting Michael Schröder discussing the syntax for the rich
>> >deps [1]. There are still a few issues we like to get some input from
>> >the wider community:
>> >
>> >IF Operator
>> >===========
>> >We concluded that the most important question was what to do with the if
>> >operator. There are two basic variants that can both be used with
>> >different symbols: forward and backward [2].
>> >
>> >Forward:
>> >Requires: (langsupport-es ? foo-lang-es)
>> >Requires: (langsupport-es ?? foo-lang-es)
>> >Requires: (langsupport-es then foo-lang-es)
>> >Requires: (langsupport-es THEN foo-lang-es)
>> >Requires: (langsupport-es -> foo-lang-es)
>> >Backward:
>> >Requires: (foo-lang-es if langsupport-es)
>> >Requires: (foo-lang-es IF langsupport-es)
>> >Requires: (foo-lang-es <- langsupport-es)
>> >
>> >With ELSE operand:
>> >Forward:
>> >Requires: (pkgB ? pkgA : pkgC)
>> >Requires: (pkgB ?? pkgA !! pkgC)
>> >Requires: (pkgB then pkgA else pkgC)
>> >Requires: (pkgB THEN pkgA ELSE pkgC)
>> >Backward:
>> >Requires: (pkgA if pkgB else pkgC)
>> >Requires: (pkgA IF pkgB ELSE pkgC)
>> >
>> >Semantics for all examples is: foo-lang-es/pkgA is needed if
>> >langsupport-es/pkgB is installed. pkgC is required instead if
>> >langsupport-es/pkgB is not installed.
>> >
>> >After a lengthy discussion we are pretty confident that the Python style
>> >(. IF . [ELSE .]) is the best choice. It gives a clear hint which
>> >direction the operator works and is more familiar than the implication
>> >arrows and THEN.
> I like the backward syntax better, it nicely reads out:
>    Requires: (foo-lang-es IF langsupport-es)
>
> "Requires foo-lang-es if langsupport-es" is almost valid English
> sentence that correctly reflects what's going to happen.

I'm mostly just kicking an idea around, but is

Requires(IF lansupport-es): foo-lang-es

at all interesting looking? It has the advantage of following the 
Requires(post, et all) syntax that currently exists.

Pat

-- 
Pat Riehecky
Scientific Linux developer

Fermi National Accelerator Laboratory
www.fnal.gov
www.scientificlinux.org



More information about the Rpm-ecosystem mailing list