[HEADS UP] rpm-4.12.90 in rawhide

Mikolaj Izdebski mizdebsk at redhat.com
Wed Jul 29 09:08:52 UTC 2015

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:
>  * & | ? :
>  * && || ? :
> 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

More information about the devel mailing list