Imported Upstream version 0.6.33 03/194203/1 upstream/0.6.33
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 30 Nov 2018 03:41:16 +0000 (12:41 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 30 Nov 2018 03:41:16 +0000 (12:41 +0900)
Change-Id: I87909fa92d6ffc652ed1fd963141f2ea08ab4e2d
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
NEWS
VERSION.cmake
bindings/solv.i
doc/gen/libsolv-bindings.3
doc/libsolv-bindings.txt
ext/repo_rpmdb.c
package/libsolv.changes
package/libsolv.spec.in
src/problems.c

diff --git a/NEWS b/NEWS
index 37b3f65..c54093c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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
index 4687de3..b78d89f 100644 (file)
@@ -49,5 +49,5 @@ SET(LIBSOLVEXT_SOVERSION "0")
 
 SET(LIBSOLV_MAJOR "0")
 SET(LIBSOLV_MINOR "6")
-SET(LIBSOLV_PATCH "32")
+SET(LIBSOLV_PATCH "33")
 
index add97a2..acd01ac 100644 (file)
@@ -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);
   }
index 7ea859f..a6534aa 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: 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
index 0d336ce..1f6422f 100644 (file)
@@ -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)
index ee226e7..cd14a9b 100644 (file)
@@ -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
index 713ead5..b647a29 100644 (file)
@@ -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
index 92e9811..6276f3c 100644 (file)
@@ -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
index 7933f7c..5bd2bf5 100644 (file)
@@ -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 */