Re: [HEADS UP] rpm-4.12.90 in rawhide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/28/2015 11:37 AM, Florian Festi wrote:
> On 07/28/2015 09:43 AM, Lubos Kardos wrote:
>> Support in rpm is not enough but libsolv supports rich deps since the version
>> 0.6.9 too thus rich deps work also in hawkey and dnf if the version 0.6.9 or
>> a newer version of libsolv is installed.
> 
> Right now only AND and OR is supported by libsolv. Implementation of IF
> ELSE is still pending.
> 
> Also we still need to settle to a final syntax for the operators [1].
> Unfortunately there is no consensus among the other packaging formats
> what to use. Right now rpm accepts 3 different styles:
>  * AND OR IF ELSE
>  * & | ? :
>  * && || ? :
> But the final release will only support on of them. As soon as the alpha
> stops eating babies that's a discussion we need to have.

I think that C-style operators (&, &&) are better than verbose
COBOL-style ones because they are consistent with relation operators (>,
>= and so on) already used by rpm. Secondly, they don't introduce
conflict with existing meaning - "Requires: foo AND bar" is valid syntax
in rpm <= 4.12, equivalent to requiring three packages separately.

>From C-style operators I would prefer single-character ones for two reasons:

1) Two-character operators may suggest short-circuit evaluation -
"Requires: foo || bar" can be misunderstood as "require foo, or bar if
and only if foo is not available", which is not how that works. There is
no such problem with single-character operators. In other words,
"|" and "&" operators are commutative, but "||" and "&&" are not.

2) Debian uses single-character operators. Cross-distro consistency and
less confusion for people working on both Fedora and Debian is a plus.

-- 
Mikolaj Izdebski
Software Engineer, Red Hat
IRC: mizdebsk
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux