On Wed, Feb 04, 2004 at 11:14:07PM -0800, Christian Goetze wrote: > I would like to say: > > Requires: (apache >= 1.36 && apache < 2.0) || apache >=2.0.48 > > How do I do that? rpm has no AND and OR conditioning (are there any plans to introduce them? It's probably the last significant difference bewteen rpm and deb). Simple AND conditioning can be modelled by consequitive Requires, e.g. all Requires are ANDed. You can also play tricks with inverting the condition and use Conflicts:, which are automatically ORed. E.g. you have the following degrees of freedom: Requires: A Requires: B ... Conflicts: X Conflicts: Y becomes: A AND B AND ... AND (not X) AND (not Y) ... So there is no way to have mixed AND/OR logic within an rpm specfile itself. The workaround is outsourcing the OR conditions into Provides of meta-packages. Create a package called apache1good with Requires: apache >= 1.36 Requires: apache < 2.0 Provides: apachegood and another called apache2good with Requires: apache >= 2.0.48 Provides: apachegood and use Requires: apachegood in the original rpm spec you are working on. Of course this doesn't help you if you wanted to ship a single rpm. :( Or you can check for presence of files, if that is possible, to distinguish the good versions from the ones you want to exclude. -- Axel.Thimm@xxxxxxxxxxxxxxxxxxx
Attachment:
pgp00027.pgp
Description: PGP signature