From 2ac1f5a76a953d30c4179baab0510c9fd6ee4563 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 21 Aug 2013 11:41:17 +0200 Subject: [PATCH] add unset() method for solvables --- bindings/solv.i | 5 +++++ doc/libsolv-bindings.3 | 21 ++++++++++++++++++--- doc/libsolv-bindings.txt | 7 +++++++ 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/bindings/solv.i b/bindings/solv.i index 0410466..d2b917e 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -2318,6 +2318,11 @@ rb_eval_string( s->enhances = repo_addid_dep(s->repo, s->enhances, id, 0); } + void unset(Id keyname) { + Solvable *s = $self->pool->solvables + $self->id; + repo_unset(s->repo, $self->id, keyname); + } + void add_deparray(Id keyname, DepId id, Id marker = -1) { Solvable *s = $self->pool->solvables + $self->id; if (marker == -1 || marker == 1) { diff --git a/doc/libsolv-bindings.3 b/doc/libsolv-bindings.3 index b68ec62..77e64c1 100644 --- a/doc/libsolv-bindings.3 +++ b/doc/libsolv-bindings.3 @@ -1,13 +1,13 @@ '\" t .\" Title: Libsolv-Bindings .\" Author: [see the "Author" section] -.\" Generator: DocBook XSL Stylesheets v1.76.1 -.\" Date: 07/02/2013 +.\" Generator: DocBook XSL Stylesheets v1.78.0 +.\" Date: 08/21/2013 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "07/02/2013" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "08/21/2013" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -2291,6 +2291,21 @@ Add a new dependency to the attributes stored in keyname\&. .RS 4 .\} .nf +\fBvoid unset(Id\fR \fIkeyname\fR\fB)\fR; +\fI$solvable\fR\fB\->unset(\fR\fI$keyname\fR\fB)\fR; +\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR +\fIsolvable\fR\fB\&.unset(\fR\fIkeyname\fR\fB)\fR +.fi +.if n \{\ +.RE +.\} +.sp +Delete data stored for the specific keyname\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf \fBbool installable()\fR; \fI$solvable\fR\fB\->installable()\fR \fIsolvable\fR\fB\&.installable()\fR diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt index 1449bba..062761f 100644 --- a/doc/libsolv-bindings.txt +++ b/doc/libsolv-bindings.txt @@ -1284,6 +1284,13 @@ spawning multiple DVDs). Add a new dependency to the attributes stored in keyname. + void unset(Id keyname); + $solvable->unset($keyname); + solvable.unset(keyname) + solvable.unset(keyname) + +Delete data stored for the specific keyname. + bool installable(); $solvable->installable() solvable.installable() -- 2.7.4