On Thu, Sep 25, 2008 at 6:53 AM, Jeff Johnson <n3npq@mac.com> wrote:
>
>
> Begin forwarded message:
>
> *From: *Jeff Johnson <n3npq@mac.com>
> *Date: *September 25, 2008 12:09:55 AM EDT
> *To: *rpm-devel@rpm5.org
> *Subject: **Adding dependency alternation using glob expressions?*
>
> rpm triggers with glob expressions are starting to congeal nicely.
>
> The basic trick to handle trigger patterns is/was a 2 level pass on an
> rpmdb index.
>
> The first pass gathers all the keys in the index that are known, the 2nd
> pass
> across existing primary keys gathers headers through secondary retrieval.
>
> I can likely wire up the mechanism with an extra loop inside of
> rpmdbInitIterator
> et al when the time comes ...
>
> So its time to identify the need and a usage case first:
>
> Let's say you want
> Requires: A
> or
> Requires: B
>
> The alternation above can be captured in a glob as
> Requires: @(A|B)
> either literally, or (if necessary) with some straightforward
> transformation.
>
> Since discussing *.spec syntax is never straightforward, I'd suggest
> permitting
> glob patterns into dependency names literally instead of thrashing through
> the aesthetics of grammarless *.spec files.
>
> Note also that pattern alternation is not quite the same as assertion
> alternation.
> I.e.
> Requires: A > 1. 0 || B > 2.0
> is not (at least easily) expressible with pattern alternation. But the lack
> of assertion alternation is unrelated to whether pattern alternation is
> useful.
>
>
> An open question is whether
> Requires: @(A|B) > 1.0
> is sufficiently useful to be permitted, or whether the syntax needs to be
> explicitly forbidden.
>
> Opinions?
>
>
I would be prefer to see implemented the first form anyway. The boolean
dependency alternation as Requires: A > 1. 0 || B > 2.0 is more general
that Requires: @(A|B) > 1.0. If i can use the first form the second isn't
necessary nor useful. What is more implementing the first form will permit
rpm5 to have finally also the "boolean or dependency" that sometime was
requested. Perhaps it is the time to do.
http://www.linux-archive.org/rpm-package-manager/46735-naive-question-boolean-dependency.html
This evolution, joined to the negate dependency operator (
https://lists.dulug.duke.edu/pipermail/rpm-devel/2007-May/002620.html),
would allow rpm5 expressing all finally the boolean dependencies. And thus
finally it would render archaic completely Joey Hess's claim ( with rpm5
some claim are already untrue IMHO) (http://joey.kitenet.net/pkg-comp/).
However if it is not possibile to have again an agreement on the first forms
the second one would be however useful, even if more limited semantically.
Regards
Elia
73 de Jeff
>
>
>
Received on Thu Sep 25 10:29:31 2008