diff options
-rw-r--r-- | bindings/solv.i | 25 | ||||
-rw-r--r-- | doc/libsolv-bindings.3 | 20 | ||||
-rw-r--r-- | doc/libsolv-bindings.txt | 16 | ||||
-rwxr-xr-x | examples/p5solv | 2 | ||||
-rwxr-xr-x | examples/pysolv | 2 | ||||
-rwxr-xr-x | examples/rbsolv | 2 |
6 files changed, 46 insertions, 21 deletions
diff --git a/bindings/solv.i b/bindings/solv.i index 76d9286..139a9a5 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -2737,6 +2737,7 @@ rb_eval_string( return q; } + # deprecated, use newsolvables instead %typemap(out) Queue newpackages Queue2Array(XSolvable *, 1, new_XSolvable(arg1->pool, id)); %newobject newpackages; Queue newpackages() { @@ -2748,6 +2749,7 @@ rb_eval_string( return q; } + # deprecated, use keptsolvables instead %typemap(out) Queue keptpackages Queue2Array(XSolvable *, 1, new_XSolvable(arg1->pool, id)); %newobject keptpackages; Queue keptpackages() { @@ -2760,6 +2762,29 @@ rb_eval_string( return q; } + %typemap(out) Queue newsolvables Queue2Array(XSolvable *, 1, new_XSolvable(arg1->pool, id)); + %newobject newsolvables; + Queue newsolvables() { + Queue q; + int cut; + queue_init(&q); + cut = transaction_installedresult(self, &q); + queue_truncate(&q, cut); + return q; + } + + %typemap(out) Queue keptsolvables Queue2Array(XSolvable *, 1, new_XSolvable(arg1->pool, id)); + %newobject keptsolvables; + Queue keptsolvables() { + Queue q; + int cut; + queue_init(&q); + cut = transaction_installedresult(self, &q); + if (cut) + queue_deleten(&q, 0, cut); + return q; + } + %typemap(out) Queue steps Queue2Array(XSolvable *, 1, new_XSolvable(arg1->pool, id)); %newobject steps; Queue steps() { diff --git a/doc/libsolv-bindings.3 b/doc/libsolv-bindings.3 index 9083825..a6c7b14 100644 --- a/doc/libsolv-bindings.3 +++ b/doc/libsolv-bindings.3 @@ -2,12 +2,12 @@ .\" Title: libsolv-bindings .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> -.\" Date: 06/06/2013 +.\" Date: 06/07/2013 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "06/06/2013" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "06/07/2013" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -4292,10 +4292,10 @@ Returns true if the transaction does not do anything, i\&.e\&. has no elements\& .RS 4 .\} .nf -\fBSolvable *newpackages()\fR; -my \fI@newsolvables\fR \fB=\fR \fI$trans\fR\fB\->newpackages()\fR; -\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newpackages()\fR -\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newpackages()\fR +\fBSolvable *newsolvables()\fR; +my \fI@newsolvables\fR \fB=\fR \fI$trans\fR\fB\->newsolvables()\fR; +\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR +\fInewsolvables\fR \fB=\fR \fItrans\fR\fB\&.newsolvables()\fR .fi .if n \{\ .RE @@ -4307,10 +4307,10 @@ Return all packages that are to be installed by the transaction\&. This are the .RS 4 .\} .nf -\fBSolvable *keptpackages()\fR; -my \fI@keptsolvables\fR \fB=\fR \fI$trans\fR\fB\->keptpackages()\fR; -\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptpackages()\fR -\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptpackages()\fR +\fBSolvable *keptsolvables()\fR; +my \fI@keptsolvables\fR \fB=\fR \fI$trans\fR\fB\->keptsolvables()\fR; +\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR +\fIkeptsolvables\fR \fB=\fR \fItrans\fR\fB\&.keptsolvables()\fR .fi .if n \{\ .RE diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt index 0da1b55..696d88f 100644 --- a/doc/libsolv-bindings.txt +++ b/doc/libsolv-bindings.txt @@ -2672,18 +2672,18 @@ Back pointer to pool. Returns true if the transaction does not do anything, i.e. has no elements. - Solvable *newpackages(); - my @newsolvables = $trans->newpackages(); - newsolvables = trans.newpackages() - newsolvables = trans.newpackages() + Solvable *newsolvables(); + my @newsolvables = $trans->newsolvables(); + newsolvables = trans.newsolvables() + newsolvables = trans.newsolvables() Return all packages that are to be installed by the transaction. This are the packages that need to be downloaded from the repositories. - Solvable *keptpackages(); - my @keptsolvables = $trans->keptpackages(); - keptsolvables = trans.keptpackages() - keptsolvables = trans.keptpackages() + Solvable *keptsolvables(); + my @keptsolvables = $trans->keptsolvables(); + keptsolvables = trans.keptsolvables() + keptsolvables = trans.keptsolvables() Return all installed packages that the transaction will keep installed. diff --git a/examples/p5solv b/examples/p5solv index 216eb08..ac2e730 100755 --- a/examples/p5solv +++ b/examples/p5solv @@ -707,7 +707,7 @@ while (1) { exit(1) if $yn eq 'n' || $yn eq 'q'; } -my @newpkgs = $trans->newpackages(); +my @newpkgs = $trans->newsolvables(); my %newpkgsfps; if (@newpkgs) { my $downloadsize = 0; diff --git a/examples/pysolv b/examples/pysolv index c4ddb08..bc12766 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -835,7 +835,7 @@ while True: yn = sys.stdin.readline().strip() if yn == 'y': break if yn == 'n' or yn == 'q': sys.exit(1) -newpkgs = trans.newpackages() +newpkgs = trans.newsolvables() newpkgsfp = {} if newpkgs: downloadsize = 0 diff --git a/examples/rbsolv b/examples/rbsolv index 741db94..6119190 100755 --- a/examples/rbsolv +++ b/examples/rbsolv @@ -720,7 +720,7 @@ while true: abort if yn == 'n' || yn == 'q' end -newpkgs = trans.newpackages() +newpkgs = trans.newsolvables() newpkgsfp = {} if !newpkgs.empty? downloadsize = 0 |