diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | VERSION.cmake | 2 | ||||
-rw-r--r-- | bindings/solv.i | 20 | ||||
-rw-r--r-- | doc/gen/libsolv-bindings.3 | 23 | ||||
-rw-r--r-- | doc/libsolv-bindings.txt | 11 | ||||
-rw-r--r-- | ext/repo_rpmdb.c | 7 | ||||
-rw-r--r-- | package/libsolv.changes | 9 | ||||
-rw-r--r-- | package/libsolv.spec.in | 2 | ||||
-rw-r--r-- | src/problems.c | 2 |
9 files changed, 65 insertions, 16 deletions
@@ -2,6 +2,11 @@ This file contains the major changes between libsolv versions: +Version 0.6.33 +- new features: + * new Selection.clone() method in the bindings + * new pool.parserpmrichdep() method in the bindings + Version 0.6.32 - fixed bug that could make fileconflict detection very slow in some cases diff --git a/VERSION.cmake b/VERSION.cmake index 4687de3..b78d89f 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0") SET(LIBSOLV_MAJOR "0") SET(LIBSOLV_MINOR "6") -SET(LIBSOLV_PATCH "32") +SET(LIBSOLV_PATCH "33") diff --git a/bindings/solv.i b/bindings/solv.i index add97a2..acd01ac 100644 --- a/bindings/solv.i +++ b/bindings/solv.i @@ -665,6 +665,9 @@ typedef int bool; #ifdef SUSE #include "repo_autopattern.h" #endif +#if defined(ENABLE_COMPLEX_DEPS) && (defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) || defined(ENABLE_RPMDB) || defined(ENABLE_RPMPKG)) +#include "pool_parserpmrichdep.h" +#endif #include "solv_xfopen.h" #include "testcase.h" @@ -1295,12 +1298,10 @@ typedef struct { return $self->q.count == 0; } %newobject clone; - Selection *clone(Selection *from, int flags = 0) { - Selection *s; - s = solv_calloc(1, sizeof(*s)); - s->pool = from->pool; - s->flags = from->flags; - queue_init_clone(&s->q, &from->q); + Selection *clone(int flags = 0) { + Selection *s = new_Selection($self->pool); + queue_init_clone(&s->q, &$self->q); + s->flags = $self->flags; return s; } void filter(Selection *lsel) { @@ -1729,6 +1730,13 @@ typedef struct { Id id = pool_str2id($self, str, create); return new_Dep($self, id); } +#if defined(ENABLE_COMPLEX_DEPS) && (defined(ENABLE_SUSEREPO) || defined(ENABLE_RPMMD) || defined(ENABLE_RPMDB) || defined(ENABLE_RPMPKG)) + %newobject Dep; + Dep *parserpmrichdep(const char *str) { + Id id = pool_parserpmrichdep($self, str); + return new_Dep($self, id); + } +#endif const char *id2str(Id id) { return pool_id2str($self, id); } diff --git a/doc/gen/libsolv-bindings.3 b/doc/gen/libsolv-bindings.3 index 7ea859f..a6534aa 100644 --- a/doc/gen/libsolv-bindings.3 +++ b/doc/gen/libsolv-bindings.3 @@ -2,12 +2,12 @@ .\" Title: Libsolv-Bindings .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 01/18/2018 +.\" Date: 02/28/2018 .\" Manual: LIBSOLV .\" Source: libsolv .\" Language: English .\" -.TH "LIBSOLV\-BINDINGS" "3" "01/18/2018" "libsolv" "LIBSOLV" +.TH "LIBSOLV\-BINDINGS" "3" "02/28/2018" "libsolv" "LIBSOLV" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -3167,7 +3167,7 @@ Back pointer to pool\&. .RS 4 .\} .nf -\fBint flags()\fR; +\fBint flags()\fR my \fI$flags\fR \fB=\fR \fI$sel\fR\fB\->flags()\fR; \fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags()\fR \fIflags\fR \fB=\fR \fIsel\fR\fB\&.flags()\fR @@ -3182,7 +3182,7 @@ Return the result flags of the selection\&. The flags are a subset of the ones u .RS 4 .\} .nf -\fBbool isempty()\fR; +\fBbool isempty()\fR \fI$sel\fR\fB\->isempty()\fR \fIsel\fR\fB\&.isempty()\fR \fIsel\fR\fB\&.isempty?\fR @@ -3197,6 +3197,21 @@ Return true if the selection is empty, i\&.e\&. no package could be matched\&. .RS 4 .\} .nf +\fBSelection clone(int\fR \fIflags\fR \fB= 0)\fR +my \fI$cloned\fR \fB=\fR \fI$sel\fR\fB\->clone()\fR; +\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR +\fIcloned\fR \fB=\fR \fIsel\fR\fB\&.clone()\fR +.fi +.if n \{\ +.RE +.\} +.sp +Return a copy of a selection\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf \fBvoid filter(Selection *\fR\fIother\fR\fB)\fR \fI$sel\fR\fB\->filter(\fR\fI$other\fR\fB)\fR; \fIsel\fR\fB\&.filter(\fR\fIother\fR\fB)\fR diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt index 0d336ce..1f6422f 100644 --- a/doc/libsolv-bindings.txt +++ b/doc/libsolv-bindings.txt @@ -1782,7 +1782,7 @@ Back pointer to pool. === METHODS === - int flags(); + int flags() my $flags = $sel->flags(); flags = sel.flags() flags = sel.flags() @@ -1795,13 +1795,20 @@ flags will either be SELECTION_NAME or SELECTION_PROVIDES depending if there was a package that matched the name or not. If there was no match at all, the flags will be zero. - bool isempty(); + bool isempty() $sel->isempty() sel.isempty() sel.isempty? Return true if the selection is empty, i.e. no package could be matched. + Selection clone(int flags = 0) + my $cloned = $sel->clone(); + cloned = sel.clone() + cloned = sel.clone() + +Return a copy of a selection. + void filter(Selection *other) $sel->filter($other); sel.filter(other) diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c index ee226e7..cd14a9b 100644 --- a/ext/repo_rpmdb.c +++ b/ext/repo_rpmdb.c @@ -446,7 +446,12 @@ headstringarray(RpmHead *h, int tag, int *cnt) static unsigned char * headbinary(RpmHead *h, int tag, unsigned int *sizep) { - return headget(h, tag, (int *)sizep, 0); + unsigned char *b = headget(h, tag, (int *)sizep, 0); + if (b && sizep && (tag == TAG_SIGMD5 || tag == SIGTAG_MD5) && *sizep > 16) { + /* due to a bug in rpm the count may be bigger if HEADERIMPORT_FAST is used */ + *sizep = 16; + } + return b; } static int diff --git a/package/libsolv.changes b/package/libsolv.changes index 713ead5..b647a29 100644 --- a/package/libsolv.changes +++ b/package/libsolv.changes @@ -1,8 +1,17 @@ ------------------------------------------------------------------- +Wed Feb 28 16:29:55 CET 2018 - mls@suse.de + +- fix bad assignment in solution refinement that led + to a memory leak +- use license tag instead of doc in the spec file [bnc#1082318] +- bump version to 0.6.33 + +------------------------------------------------------------------- Tue Feb 13 11:51:11 CET 2018 - mls@suse.de - fixed bug that could make fileconflict detection very slow in some cases [bnc#953130] +- bump version to 0.6.32 ------------------------------------------------------------------- Wed Jan 31 11:41:51 CET 2018 - mls@suse.de diff --git a/package/libsolv.spec.in b/package/libsolv.spec.in index 92e9811..6276f3c 100644 --- a/package/libsolv.spec.in +++ b/package/libsolv.spec.in @@ -260,7 +260,7 @@ export NO_BRP_STRIP_DEBUG=true %files -n libsolv@LIBSOLV_SOVERSION@ %defattr(-,root,root) -%doc LICENSE* +%license LICENSE* %{_libdir}/libsolv.so.* %{_libdir}/libsolvext.so.* %endif diff --git a/src/problems.c b/src/problems.c index 7933f7c..5bd2bf5 100644 --- a/src/problems.c +++ b/src/problems.c @@ -773,7 +773,7 @@ create_solutions(Solver *solv, int probnr, int solidx) memset(&solv->problems, 0, sizeof(solv->problems)); /* save branches queue */ - branches_save = solv->problems; + branches_save = solv->branches; memset(&solv->branches, 0, sizeof(solv->branches)); /* save decisionq_reason */ |