]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add matchesdep() method to bindings
authorMichael Schroeder <mls@suse.de>
Thu, 17 Nov 2016 13:54:40 +0000 (14:54 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 17 Nov 2016 13:54:40 +0000 (14:54 +0100)
bindings/solv.i
doc/libsolv-bindings.3
doc/libsolv-bindings.txt

index 64f51d07bc07a7fa02b72da152f761eddc1abeb6..a8f9d64cddaec91bc22afc8d15772921b84ede84 100644 (file)
@@ -2963,6 +2963,12 @@ rb_eval_string(
   int evrcmp(XSolvable *s2) {
     return pool_evrcmp($self->pool, $self->pool->solvables[$self->id].evr, s2->pool->solvables[s2->id].evr, EVRCMP_COMPARE);
   }
+#ifdef SWIGRUBY
+  %rename("matchesdep?") matchesdep;
+#endif
+  bool matchesdep(Id keyname, DepId id, Id marker = -1) {
+    return solvable_matchesdep($self->pool->solvables + $self->id, keyname, id, marker);
+  }
 
 #if defined(SWIGTCL)
   %rename("==") __eq__;
index 6b57ebfb6da831f71b7952f8be7f50848402533f..ebe63528cd13a915cd79777236ae03203b6c4cdb 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\"      Date: 05/03/2016
+.\"      Date: 11/17/2016
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
-.TH "LIBSOLV\-BINDINGS" "3" "05/03/2016" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "11/17/2016" "libsolv" "LIBSOLV"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -2514,8 +2514,8 @@ Return true if the solvable is installed on the system\&.
 .nf
 \fBbool identical(Solvable *\fR\fIother\fR\fB)\fR
 \fI$solvable\fR\fB\->identical(\fR\fI$other\fR\fB)\fR
-\fI$solvable\fR\fB\&.identical(\fR\fIother\fR\fB)\fR
-\fI$solvable\fR\fB\&.identical?(\fR\fIother\fR\fB)\fR
+\fIsolvable\fR\fB\&.identical(\fR\fIother\fR\fB)\fR
+\fIsolvable\fR\fB\&.identical?(\fR\fIother\fR\fB)\fR
 .fi
 .if n \{\
 .RE
@@ -2528,9 +2528,9 @@ Return true if the two solvables are identical\&.
 .\}
 .nf
 \fBint evrcmp(Solvable *\fR\fIother\fR\fB)\fR
-\fI$solvable\fR\fB\->evrcmp(\fR\fIother\fR\fB)\fR
-\fI$solvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
-\fI$solvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
+\fI$solvable\fR\fB\->evrcmp(\fR\fI$other\fR\fB)\fR
+\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
+\fIsolvable\fR\fB\&.evrcmp(\fR\fIother\fR\fB)\fR
 .fi
 .if n \{\
 .RE
@@ -2542,6 +2542,21 @@ Returns \-1 if the epoch/version/release of the solvable is less than the one fr
 .RS 4
 .\}
 .nf
+\fBint matchesdep(Id\fR \fIkeyname\fR\fB, DepId\fR \fIid\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR
+\fI$solvable\fR\fB\->matchesdep(\fR\fI$keyname\fR\fB,\fR \fI$dep\fR\fB)\fR
+\fIsolvable\fR\fB\&.matchesdep(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+\fIsolvable\fR\fB\&.matchesdep?(\fR\fIkeyname\fR\fB,\fR \fIdep\fR\fB)\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Return true if the dependencies stored in keyname match the specified dependeny\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
 \fBSelection Selection(int\fR \fIsetflags\fR \fB= 0)\fR
 my \fI$sel\fR \fB=\fR \fI$solvable\fR\fB\->Selection()\fR;
 \fIsel\fR \fB=\fR \fIsolvable\fR\fB\&.Selection()\fR
index 79f4c2cffb111e62c33f52d0834a2993577bf727..6ce67beaae48e761002277e26da1907db5276b10 100644 (file)
@@ -1400,20 +1400,27 @@ Return true if the solvable is installed on the system.
 
        bool identical(Solvable *other)
        $solvable->identical($other)
-       $solvable.identical(other)
-       $solvable.identical?(other)
+       solvable.identical(other)
+       solvable.identical?(other)
 
 Return true if the two solvables are identical.
 
        int evrcmp(Solvable *other)
-       $solvable->evrcmp(other)
-       $solvable.evrcmp(other)
-       $solvable.evrcmp(other)
+       $solvable->evrcmp($other)
+       solvable.evrcmp(other)
+       solvable.evrcmp(other)
 
 Returns -1 if the epoch/version/release of the solvable is less than the
 one from the other solvable, 1 if it is greater, and 0 if they are equal.
 Note that "equal" does not mean that the evr is identical.
 
+       int matchesdep(Id keyname, DepId id, Id marker = -1)
+       $solvable->matchesdep($keyname, $dep)
+       solvable.matchesdep(keyname, dep)
+       solvable.matchesdep?(keyname, dep)
+
+Return true if the dependencies stored in keyname match the specified dependeny.
+
        Selection Selection(int setflags = 0)
        my $sel = $solvable->Selection();
        sel = solvable.Selection()