From 6d0b5397e240d518318808a458444880161d5690 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 29 Mar 2019 16:13:46 +0100 Subject: [PATCH] Update to 0.7.4 Signed-off-by: Igor Gnatenko --- .gitignore | 1 + 0001-bindings-Add-pool.best_solvables.patch | 101 ----------------- ...indings-Add-pool.whatmatchessolvable.patch | 106 ------------------ ...pport-for-modular-updateinfoxml-data.patch | 101 ----------------- 0004-Simplify-moldule-code.patch | 57 ---------- libsolv.spec | 13 +-- sources | 2 +- 7 files changed, 7 insertions(+), 374 deletions(-) delete mode 100644 0001-bindings-Add-pool.best_solvables.patch delete mode 100644 0002-bindings-Add-pool.whatmatchessolvable.patch delete mode 100644 0003-Add-support-for-modular-updateinfoxml-data.patch delete mode 100644 0004-Simplify-moldule-code.patch diff --git a/.gitignore b/.gitignore index 007ee0b..e0103e6 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /libsolv-0.7.1.tar.gz /libsolv-0.7.2.tar.gz /libsolv-0.7.3.tar.gz +/libsolv-0.7.4.tar.gz diff --git a/0001-bindings-Add-pool.best_solvables.patch b/0001-bindings-Add-pool.best_solvables.patch deleted file mode 100644 index dfb25f0..0000000 --- a/0001-bindings-Add-pool.best_solvables.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 5ddb0ce955faacaaaee03b22407049e10a2317ea Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sat, 9 Feb 2019 18:30:29 +0100 -Subject: [PATCH 1/2] bindings: Add pool.best_solvables() - -Signed-off-by: Igor Gnatenko ---- - bindings/solv.i | 9 +++++++++ - doc/gen/libsolv-bindings.3 | 19 +++++++++++++++++-- - doc/libsolv-bindings.txt | 7 +++++++ - 3 files changed, 33 insertions(+), 2 deletions(-) - -diff --git a/bindings/solv.i b/bindings/solv.i -index adaf1a37..cbfddb73 100644 ---- a/bindings/solv.i -+++ b/bindings/solv.i -@@ -381,6 +381,7 @@ typedef struct { - - %typemap(in) Queue Array2Queue(SWIG_AsVal_int, "integers") - %typemap(in) Queue solvejobs ObjArray2Queue(Job *, queue_push2(&$1, obj->how, obj->what)) -+%typemap(in) Queue solvables ObjArray2Queue(XSolvable *, queue_push(&$1, obj->id)) - - - -@@ -1945,6 +1946,14 @@ typedef struct { - queue_push(&q, p); - return q; - } -+ %typemap(out) Queue best_solvables Queue2Array(XSolvable *, 1, new_XSolvable(arg1, id)); -+ %newobject best_solvables; -+ Queue best_solvables(Queue solvables, int flags=0) { -+ Queue q; -+ queue_init_clone(&q, &solvables); -+ pool_best_solvables($self, &q, flags); -+ return q; -+ } - - Id towhatprovides(Queue q) { - return pool_queuetowhatprovides($self, &q); -diff --git a/doc/gen/libsolv-bindings.3 b/doc/gen/libsolv-bindings.3 -index 9f84c77e..a6cf3588 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 vsnapshot --.\" Date: 12/06/2018 -+.\" Date: 02/13/2019 - .\" Manual: LIBSOLV - .\" Source: libsolv - .\" Language: English - .\" --.TH "LIBSOLV\-BINDINGS" "3" "12/06/2018" "libsolv" "LIBSOLV" -+.TH "LIBSOLV\-BINDINGS" "3" "02/13/2019" "libsolv" "LIBSOLV" - .\" ----------------------------------------------------------------- - .\" * Define some portability stuff - .\" ----------------------------------------------------------------- -@@ -851,6 +851,21 @@ Return all solvables that provide the specified dependency\&. You can use either - .RS 4 - .\} - .nf -+\fBSolvable *best_solvables(Solvable *\fR\fIsolvables\fR\fB, int\fR \fIflags\fR \fB= 0)\fR -+my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->best_solvables(\fR\fI$solvables\fR\fB)\fR; -+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR -+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.best_solvables(\fR\fIsolvables\fR\fB)\fR -+.fi -+.if n \{\ -+.RE -+.\} -+.sp -+Filter list of solvables by repo priority, architecture and version\&. -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf - \fBId *matchprovidingids(const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR - my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->matchprovidingids(\fR\fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; - \fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR -diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt -index 3839ed96..450ed41c 100644 ---- a/doc/libsolv-bindings.txt -+++ b/doc/libsolv-bindings.txt -@@ -488,6 +488,13 @@ the call to addfileprovides(). - Return all solvables that provide the specified dependency. You can use either - a Dep object or a simple Id as argument. - -+ Solvable *best_solvables(Solvable *solvables, int flags = 0) -+ my @solvables = $pool->best_solvables($solvables); -+ solvables = pool.best_solvables(solvables) -+ solvables = pool.best_solvables(solvables) -+ -+Filter list of solvables by repo priority, architecture and version. -+ - Id *matchprovidingids(const char *match, int flags) - my @ids = $pool->matchprovidingids($match, $flags); - ids = pool.matchprovidingids(match, flags) --- -2.20.1 - diff --git a/0002-bindings-Add-pool.whatmatchessolvable.patch b/0002-bindings-Add-pool.whatmatchessolvable.patch deleted file mode 100644 index 02fa504..0000000 --- a/0002-bindings-Add-pool.whatmatchessolvable.patch +++ /dev/null @@ -1,106 +0,0 @@ -From 8bb3b58fcc63fce73f6d3f3cd09e793fa3903ec2 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Sat, 9 Feb 2019 21:51:32 +0100 -Subject: [PATCH 2/2] bindings: Add pool.whatmatchessolvable() - -Signed-off-by: Igor Gnatenko ---- - bindings/solv.i | 17 +++++++++++++++++ - doc/gen/libsolv-bindings.3 | 15 +++++++++++++++ - doc/libsolv-bindings.txt | 8 ++++++++ - 3 files changed, 40 insertions(+) - -diff --git a/bindings/solv.i b/bindings/solv.i -index cbfddb73..b5074497 100644 ---- a/bindings/solv.i -+++ b/bindings/solv.i -@@ -663,6 +663,12 @@ SWIG_AsValDepId(void *obj, int *val) { - %typemaps_asval(%checkcode(POINTER), SWIG_AsValSolvFpPtr, "SWIG_AsValSolvFpPtr", FILE*); - %typemaps_asval(%checkcode(INT32), SWIG_AsValDepId, "SWIG_AsValDepId", DepId); - -+%define SamePool(pool1,pool2) %{ { -+ if (pool1 != pool2) -+ SWIG_exception_fail(SWIG_ArgError(EINVAL), "pool of argument $argnum must be same as pool in method's object"); -+} -+%} -+%enddef - - /** - ** the C declarations -@@ -1067,10 +1073,12 @@ typedef struct { - Id what; - } Job; - -+%typemap(check) XSolvable *pool_solvable SamePool($1->pool, arg1) - %nodefaultctor Pool; - %nodefaultdtor Pool; - typedef struct { - } Pool; -+%typemap(check) XSolvable *pool_solvable; - - %nodefaultctor Repo; - %nodefaultdtor Repo; -@@ -1978,6 +1986,15 @@ typedef struct { - return q; - } - -+ %typemap(out) Queue whatmatchessolvable Queue2Array(XSolvable *, 1, new_XSolvable(arg1, id)); -+ %newobject whatmatchessolvable; -+ Queue whatmatchessolvable(Id keyname, XSolvable *pool_solvable, Id marker = -1) { -+ Queue q; -+ queue_init(&q); -+ pool_whatmatchessolvable($self, keyname, pool_solvable->id, &q, marker); -+ return q; -+ } -+ - #ifdef SWIGRUBY - %rename("isknownarch?") isknownarch; - #endif -diff --git a/doc/gen/libsolv-bindings.3 b/doc/gen/libsolv-bindings.3 -index a6cf3588..47bf7dd7 100644 ---- a/doc/gen/libsolv-bindings.3 -+++ b/doc/gen/libsolv-bindings.3 -@@ -866,6 +866,21 @@ Filter list of solvables by repo priority, architecture and version\&. - .RS 4 - .\} - .nf -+\fBSolvable *whatmatchessolvable(Id\fR \fIkeyname\fR\fB, Solvable\fR \fIsolvable\fR\fB, Id\fR \fImarker\fR \fB= \-1)\fR -+my \fI@solvables\fR \fB=\fR \fI$pool\fR\fB\->whatmatchessolvable(\fR\fI$keyname\fR\fB,\fR \fI$solvable\fR\fB)\fR -+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR -+\fIsolvables\fR \fB=\fR \fIpool\fR\fB\&.whatmatchessolvable(\fR\fIkeyname\fR\fB,\fR \fIsolvable\fR\fB)\fR -+.fi -+.if n \{\ -+.RE -+.\} -+.sp -+Return all solvables that match package dependencies in against solvable\(cqs provides\&. -+.sp -+.if n \{\ -+.RS 4 -+.\} -+.nf - \fBId *matchprovidingids(const char *\fR\fImatch\fR\fB, int\fR \fIflags\fR\fB)\fR - my \fI@ids\fR \fB=\fR \fI$pool\fR\fB\->matchprovidingids(\fR\fI$match\fR\fB,\fR \fI$flags\fR\fB)\fR; - \fIids\fR \fB=\fR \fIpool\fR\fB\&.matchprovidingids(\fR\fImatch\fR\fB,\fR \fIflags\fR\fB)\fR -diff --git a/doc/libsolv-bindings.txt b/doc/libsolv-bindings.txt -index 450ed41c..f3020c54 100644 ---- a/doc/libsolv-bindings.txt -+++ b/doc/libsolv-bindings.txt -@@ -495,6 +495,14 @@ a Dep object or a simple Id as argument. - - Filter list of solvables by repo priority, architecture and version. - -+ Solvable *whatmatchessolvable(Id keyname, Solvable solvable, Id marker = -1) -+ my @solvables = $pool->whatmatchessolvable($keyname, $solvable) -+ solvables = pool.whatmatchessolvable(keyname, solvable) -+ solvables = pool.whatmatchessolvable(keyname, solvable) -+ -+Return all solvables that match package dependencies in against solvable's -+provides. -+ - Id *matchprovidingids(const char *match, int flags) - my @ids = $pool->matchprovidingids($match, $flags); - ids = pool.matchprovidingids(match, flags) --- -2.20.1 - diff --git a/0003-Add-support-for-modular-updateinfoxml-data.patch b/0003-Add-support-for-modular-updateinfoxml-data.patch deleted file mode 100644 index 0955503..0000000 --- a/0003-Add-support-for-modular-updateinfoxml-data.patch +++ /dev/null @@ -1,101 +0,0 @@ -From aac9f0c2d791fa96bc9423231050f9e18fb973d6 Mon Sep 17 00:00:00 2001 -From: Jaroslav Mracek -Date: Thu, 17 Jan 2019 12:48:05 +0100 -Subject: [PATCH] Add support for modular updateinfo.xml data - ---- - ext/repo_updateinfoxml.c | 37 +++++++++++++++++++++++++++++++++++++ - src/knownid.h | 8 ++++++++ - 2 files changed, 45 insertions(+) - -diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c -index ff84d32..8a3d147 100644 ---- a/ext/repo_updateinfoxml.c -+++ b/ext/repo_updateinfoxml.c -@@ -37,6 +37,7 @@ - * - * - * Fedora 8 -+ * - * - * imlib-debuginfo-1.9.15-6.fc8.ppc64.rpm - * True -@@ -70,6 +71,7 @@ enum state { - STATE_RELOGIN, - STATE_RIGHTS, - STATE_SEVERITY, -+ STATE_MODULE, - NUMSTATES - }; - -@@ -92,6 +94,7 @@ static struct solv_xmlparser_element stateswitches[] = { - { STATE_PKGLIST, "collection", STATE_COLLECTION, 0 }, - { STATE_COLLECTION, "name", STATE_NAME, 1 }, - { STATE_COLLECTION, "package", STATE_PACKAGE, 0 }, -+ { STATE_COLLECTION, "module", STATE_MODULE, 0 }, - { STATE_PACKAGE, "filename", STATE_FILENAME, 1 }, - { STATE_PACKAGE, "reboot_suggested",STATE_REBOOT, 1 }, - { STATE_PACKAGE, "restart_suggested",STATE_RESTART, 1 }, -@@ -321,6 +324,40 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha - repodata_set_id(pd->data, pd->collhandle, UPDATE_COLLECTION_ARCH, a); - break; - } -+ case STATE_MODULE: -+ { -+ const char *name = 0, *stream = 0, *version = 0, *context = 0, *arch = 0; -+ Id name_id, stream_id, version_id, context_id, arch_id = 0; -+ for (; *atts; atts += 2) -+ { -+ if (!strcmp(*atts, "arch")) -+ arch = atts[1]; -+ else if (!strcmp(*atts, "name")) -+ name = atts[1]; -+ else if (!strcmp(*atts, "stream")) -+ stream = atts[1]; -+ else if (!strcmp(*atts, "version")) -+ version = atts[1]; -+ else if (!strcmp(*atts, "context")) -+ context = atts[1]; -+ } -+ name_id = pool_str2id(pool, name, 1); -+ if (arch) -+ arch_id = pool_str2id(pool, arch, 1); -+ stream_id = pool_str2id(pool, stream, 1); -+ version_id = pool_str2id(pool, version, 1); -+ context_id = pool_str2id(pool, context, 1); -+ -+ Id module_handle = repodata_new_handle(pd->data); -+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_NAME, name_id); -+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_STREAM, stream_id); -+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_VERSION, version_id); -+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_CONTEXT, context_id); -+ if (arch_id) -+ repodata_set_id(pd->data, module_handle, UPDATE_MODULE_ARCH, arch_id); -+ repodata_add_flexarray(pd->data, pd->handle, UPDATE_MODULE, module_handle); -+ break; -+ } - - default: - break; -diff --git a/src/knownid.h b/src/knownid.h -index 8e53183..b5b41d6 100644 ---- a/src/knownid.h -+++ b/src/knownid.h -@@ -250,6 +250,14 @@ KNOWNID(SIGNATURE_TIME, "signature:time"), - KNOWNID(SIGNATURE_EXPIRES, "signature:expires"), - KNOWNID(SIGNATURE_DATA, "signature:data"), - -+/* 'content' of patch, usually list of modules */ -+KNOWNID(UPDATE_MODULE, "update:module"), /* "name stream version context arch" */ -+KNOWNID(UPDATE_MODULE_NAME, "update:module:name"), /* name */ -+KNOWNID(UPDATE_MODULE_STREAM, "update:module:stream"), /* stream */ -+KNOWNID(UPDATE_MODULE_VERSION, "update:module:version"), /* version */ -+KNOWNID(UPDATE_MODULE_CONTEXT, "update:module:context"), /* context */ -+KNOWNID(UPDATE_MODULE_ARCH, "update:module:arch"), /* architecture */ -+ - KNOWNID(ID_NUM_INTERNAL, 0) - - #ifdef KNOWNID_INITIALIZE --- -libgit2 0.27.7 - diff --git a/0004-Simplify-moldule-code.patch b/0004-Simplify-moldule-code.patch deleted file mode 100644 index db0cb41..0000000 --- a/0004-Simplify-moldule-code.patch +++ /dev/null @@ -1,57 +0,0 @@ -From f9a8953aee107d148ddabddd7217ba7656ec46f8 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Wed, 13 Feb 2019 14:02:31 +0100 -Subject: [PATCH] Simplify moldule code - ---- - ext/repo_updateinfoxml.c | 26 ++++++++++++-------------- - 1 file changed, 12 insertions(+), 14 deletions(-) - -diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c -index 8a3d147..f375727 100644 ---- a/ext/repo_updateinfoxml.c -+++ b/ext/repo_updateinfoxml.c -@@ -327,7 +327,8 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha - case STATE_MODULE: - { - const char *name = 0, *stream = 0, *version = 0, *context = 0, *arch = 0; -- Id name_id, stream_id, version_id, context_id, arch_id = 0; -+ Id module_handle; -+ - for (; *atts; atts += 2) - { - if (!strcmp(*atts, "arch")) -@@ -341,20 +342,17 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha - else if (!strcmp(*atts, "context")) - context = atts[1]; - } -- name_id = pool_str2id(pool, name, 1); -+ module_handle = repodata_new_handle(pd->data); -+ if (name) -+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_NAME, name); -+ if (stream) -+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_STREAM, stream); -+ if (version) -+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_VERSION, version); -+ if (context) -+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_CONTEXT, context); - if (arch) -- arch_id = pool_str2id(pool, arch, 1); -- stream_id = pool_str2id(pool, stream, 1); -- version_id = pool_str2id(pool, version, 1); -- context_id = pool_str2id(pool, context, 1); -- -- Id module_handle = repodata_new_handle(pd->data); -- repodata_set_id(pd->data, module_handle, UPDATE_MODULE_NAME, name_id); -- repodata_set_id(pd->data, module_handle, UPDATE_MODULE_STREAM, stream_id); -- repodata_set_id(pd->data, module_handle, UPDATE_MODULE_VERSION, version_id); -- repodata_set_id(pd->data, module_handle, UPDATE_MODULE_CONTEXT, context_id); -- if (arch_id) -- repodata_set_id(pd->data, module_handle, UPDATE_MODULE_ARCH, arch_id); -+ repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_ARCH, arch); - repodata_add_flexarray(pd->data, pd->handle, UPDATE_MODULE, module_handle); - break; - } --- -libgit2 0.27.7 - diff --git a/libsolv.spec b/libsolv.spec index e95bda1..01a812b 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -41,20 +41,14 @@ %endif Name: lib%{libname} -Version: 0.7.3 -Release: 4%{?dist} +Version: 0.7.4 +Release: 1%{?dist} Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -# https://github.com/openSUSE/libsolv/pull/298 -Patch0001: 0001-bindings-Add-pool.best_solvables.patch -Patch0002: 0002-bindings-Add-pool.whatmatchessolvable.patch -Patch0003: 0003-Add-support-for-modular-updateinfoxml-data.patch -Patch0004: 0004-Simplify-moldule-code.patch - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: ninja-build @@ -303,6 +297,9 @@ Python 3 version. %endif %changelog +* Fri Mar 29 16:13:00 CET 2019 Igor Gnatenko - 0.7.4-1 +- Update to 0.7.4 + * Tue Feb 26 2019 Pavla Kratochvilova - 0.7.3-4 - Backport: Add support for modular updateinfo.xml data diff --git a/sources b/sources index 6acc7be..8a4a3ae 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsolv-0.7.3.tar.gz) = 7e2864265636c00340d1d4c4d3a53a22638d43681c8239e61f8848c9bf217fb14b46de449e720707965f8da39fb1cbe0f629898ca9b970d5b18b792bf6158343 +SHA512 (libsolv-0.7.4.tar.gz) = 74507b131bf9341d9ed9ff113cb01ccd2bc0e0315e6f2361fd23939de5ef051ba6e4bf1df494989569881849b7dd8cefbefe09fba5f9774f5435cfa8ab25512d