From: Michael Schroeder Date: Mon, 4 Sep 2017 09:48:47 +0000 (+0200) Subject: Add REL_UNLESS to bindings and doc X-Git-Tag: 0.6.29~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfaa56c0a35127a0a7754c393dbd4481bb164a9f;p=thirdparty%2Flibsolv.git Add REL_UNLESS to bindings and doc --- diff --git a/bindings/solv.i b/bindings/solv.i index ec069c73..0b90da54 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -947,6 +947,7 @@ typedef int Id; %constant int REL_ELSE; %constant int REL_ERROR; %constant int REL_WITHOUT; +%constant int REL_UNLESS; typedef struct { Pool* const pool; diff --git a/doc/gen/libsolv-bindings.3 b/doc/gen/libsolv-bindings.3 index 3d34edcd..0e911159 100644 --- a/doc/gen/libsolv-bindings.3 +++ b/doc/gen/libsolv-bindings.3 @@ -1,13 +1,13 @@ '\" t .\" Title: Libsolv-Bindings .\" Author: [see the "Author" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 08/04/2017 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 09/04/2017 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "08/04/2017" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "09/04/2017" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- diff --git a/doc/gen/libsolv-pool.3 b/doc/gen/libsolv-pool.3 index 1311a5ab..b2e63a39 100644 --- a/doc/gen/libsolv-pool.3 +++ b/doc/gen/libsolv-pool.3 @@ -1,13 +1,13 @@ '\" t .\" Title: Libsolv-Pool .\" Author: [see the "Author" section] -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 08/04/2017 +.\" Generator: DocBook XSL Stylesheets v1.78.1 +.\" Date: 09/04/2017 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-POOL" "3" "08/04/2017" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-POOL" "3" "09/04/2017" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -608,6 +608,11 @@ An internal file conflict dependency used to represent file conflicts\&. See the A conditional dependency, the \(lqname\(rq sub\-dependency is only considered if the \(lqevr\(rq sub\-dependency is fulfilled\&. See the section about boolean dependencies about more information\&. .RE .PP +\fBREL_UNLESS\fR +.RS 4 +A conditional dependency, the \(lqname\(rq sub\-dependency is only considered if the \(lqevr\(rq sub\-dependency is not fulfilled\&. See the section about boolean dependencies about more information\&. +.RE +.PP \fBREL_COMPAT\fR .RS 4 A compat dependency used in Haiku to represent version ranges\&. The \(lqname\(rq part is the actual version, the \(lqevr\(rq part is the backwards compatibility version\&. @@ -625,7 +630,7 @@ A debian multiarch annotation\&. The most common value for the \(lqevr\(rq part .PP \fBREL_ELSE\fR .RS 4 -The else part of a \(lqREL_COND\(rq dependency\&. See the section about boolean dependencies\&. +The else part of a \(lqREL_COND\(rq or \(lqREL_UNLESS\(rq dependency\&. See the section about boolean dependencies\&. .RE .PP \fBREL_ERROR\fR @@ -1283,9 +1288,14 @@ The expression is true if both dependencies are true and are fulfilled by the sa The expression is true if the first dependency is true or the second dependency is false\&. \(lqA REL_COND B\(rq is equivalent to \(lqA REL_OR (NOT B)\(rq (except that libsolv does not expose \(lqNOT\(rq)\&. .RE .PP +\fBREL_UNLESS\fR +.RS 4 +The expression is true if the first dependency is true and the second dependency is false\&. \(lqA REL_UNLESS B\(rq is equivalent to \(lqA REL_AND (NOT B)\(rq (except that libsolv does not expose \(lqNOT\(rq)\&. +.RE +.PP \fBREL_ELSE\fR .RS 4 -The \(lqelse\(rq part of a \(lqREL_COND\(rq dependency\&. It has to be directly in the evr part of \(lqREL_COND\(rq, e\&.g\&. \(lqfoo REL_COND (bar REL_ELSE baz)\(rq\&. This is equivalent to writing \(lq(foo REL_COND bar) REL_AND (bar REL_OR baz)\(rq\&. +The \(lqelse\(rq part of a \(lqREL_COND\(rq or \(lqREL_UNLESS\(rq dependency\&. It has to be directly in the evr part of the condition, e\&.g\&. \(lqfoo REL_COND (bar REL_ELSE baz)\(rq\&. For \(lqREL_COND\(rq this is equivalent to writing \(lq(foo REL_COND bar) REL_AND (bar REL_OR baz)\(rq\&. For \(lqREL_UNLESS\(rq this is equivalent to writing \(lq(foo REL_UNLESS bar) REL_OR (bar REL_AND baz)\(rq\&. .RE .sp Each sub\-dependency of a boolean dependency can in turn be a boolean dependency, so you can chain them to create complex dependencies\&. diff --git a/doc/libsolv-pool.txt b/doc/libsolv-pool.txt index 26fef4ba..cc7707ad 100644 --- a/doc/libsolv-pool.txt +++ b/doc/libsolv-pool.txt @@ -408,6 +408,11 @@ A conditional dependency, the ``name'' sub-dependency is only considered if the ``evr'' sub-dependency is fulfilled. See the section about boolean dependencies about more information. +*REL_UNLESS*:: +A conditional dependency, the ``name'' sub-dependency is only considered if +the ``evr'' sub-dependency is not fulfilled. See the section about boolean +dependencies about more information. + *REL_COMPAT*:: A compat dependency used in Haiku to represent version ranges. The ``name'' part is the actual version, the ``evr'' part is the backwards @@ -424,8 +429,8 @@ A debian multiarch annotation. The most common value for the ``evr'' part is ``any''. *REL_ELSE*:: -The else part of a ``REL_COND'' dependency. See the section about -boolean dependencies. +The else part of a ``REL_COND'' or ``REL_UNLESS'' dependency. See the +section about boolean dependencies. *REL_ERROR*:: An illegal dependency. This is useful to encode dependency parse errors. @@ -859,10 +864,19 @@ The expression is true if the first dependency is true or the second dependency is false. ``A REL_COND B'' is equivalent to ``A REL_OR (NOT B)'' (except that libsolv does not expose ``NOT''). +*REL_UNLESS*:: +The expression is true if the first dependency is true and the second +dependency is false. ``A REL_UNLESS B'' is equivalent to +``A REL_AND (NOT B)'' (except that libsolv does not expose ``NOT''). + *REL_ELSE*:: -The ``else'' part of a ``REL_COND'' dependency. It has to be directly -in the evr part of ``REL_COND'', e.g. ``foo REL_COND (bar REL_ELSE baz)''. -This is equivalent to writing ``(foo REL_COND bar) REL_AND (bar REL_OR baz)''. +The ``else'' part of a ``REL_COND'' or ``REL_UNLESS'' dependency. +It has to be directly in the evr part of the condition, +e.g. ``foo REL_COND (bar REL_ELSE baz)''. +For ``REL_COND'' this is equivalent to writing +``(foo REL_COND bar) REL_AND (bar REL_OR baz)''. +For ``REL_UNLESS'' this is equivalent to writing +``(foo REL_UNLESS bar) REL_OR (bar REL_AND baz)''. Each sub-dependency of a boolean dependency can in turn be a boolean dependency, so you can chain them to create complex dependencies.