diff --git a/.gitignore b/.gitignore index 1836411..3fa2137 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /libsolv-668e249.tar.gz /libsolv-0.6.27.tar.gz /libsolv-0.6.28.tar.gz +/libsolv-0.6.29.tar.gz diff --git a/0001-Support-REL_WITHOUT.patch b/0001-Support-REL_WITHOUT.patch deleted file mode 100644 index 00ba152..0000000 --- a/0001-Support-REL_WITHOUT.patch +++ /dev/null @@ -1,196 +0,0 @@ -From 7fea982667f20409403e794ab916dbb183681b4b Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Thu, 3 Aug 2017 14:54:26 +0200 -Subject: [PATCH] Support REL_WITHOUT - -Because we can. ---- - bindings/solv.i | 1 + - ext/pool_parserpmrichdep.c | 10 ++++++---- - ext/testcase.c | 1 + - src/pool.c | 28 +++++++++++++++++++++++----- - src/pool.h | 1 + - src/poolid.c | 6 ++++-- - src/selection.c | 4 ++-- - 7 files changed, 38 insertions(+), 13 deletions(-) - -diff --git a/bindings/solv.i b/bindings/solv.i -index 354cde7..ec069c7 100644 ---- a/bindings/solv.i -+++ b/bindings/solv.i -@@ -946,6 +946,7 @@ typedef int Id; - %constant int REL_MULTIARCH; - %constant int REL_ELSE; - %constant int REL_ERROR; -+%constant int REL_WITHOUT; - - typedef struct { - Pool* const pool; -diff --git a/ext/pool_parserpmrichdep.c b/ext/pool_parserpmrichdep.c -index d3e559e..0b54677 100644 ---- a/ext/pool_parserpmrichdep.c -+++ b/ext/pool_parserpmrichdep.c -@@ -17,10 +17,12 @@ static struct RichOpComp { - int l; - Id fl; - } RichOps[] = { -- { "and", 3, REL_AND }, -- { "or", 2, REL_OR }, -- { "if", 2, REL_COND }, -- { "else", 4, REL_ELSE }, -+ { "and", 3, REL_AND }, -+ { "or", 2, REL_OR }, -+ { "if", 2, REL_COND }, -+ { "else", 4, REL_ELSE }, -+ { "with", 4, REL_WITH }, -+ { "without", 7, REL_WITHOUT }, - { NULL, 0, 0}, - }; - -diff --git a/ext/testcase.c b/ext/testcase.c -index 26acefa..25c23cb 100644 ---- a/ext/testcase.c -+++ b/ext/testcase.c -@@ -383,6 +383,7 @@ struct oplist { - { REL_AND, "&" }, - { REL_OR , "|" }, - { REL_WITH , "+" }, -+ { REL_WITHOUT , "-" }, - { REL_NAMESPACE , "" }, - { REL_ARCH, "." }, - { REL_MULTIARCH, "" }, -diff --git a/src/pool.c b/src/pool.c -index bd97026..5d2d033 100644 ---- a/src/pool.c -+++ b/src/pool.c -@@ -705,6 +705,10 @@ pool_match_nevr_rel(Pool *pool, Solvable *s, Id d) - if (!pool_match_nevr(pool, s, name)) - return 0; - return pool_match_nevr(pool, s, evr); -+ case REL_WITHOUT: -+ if (!pool_match_nevr(pool, s, name)) -+ return 0; -+ return !pool_match_nevr(pool, s, evr); - case REL_MULTIARCH: - if (evr != ARCH_ANY) - return 0; -@@ -818,7 +822,7 @@ pool_match_dep(Pool *pool, Id d1, Id d2) - { - /* we use potentially matches for complex deps */ - rd1 = GETRELDEP(pool, d1); -- if (rd1->flags == REL_AND || rd1->flags == REL_OR || rd1->flags == REL_WITH || rd1->flags == REL_COND) -+ if (rd1->flags == REL_AND || rd1->flags == REL_OR || rd1->flags == REL_WITH || rd1->flags == REL_WITHOUT || rd1->flags == REL_COND) - { - if (pool_match_dep(pool, rd1->name, d2)) - return 1; -@@ -828,7 +832,7 @@ pool_match_dep(Pool *pool, Id d1, Id d2) - if (rd1->flags != REL_ELSE) - return 0; - } -- if (rd1->flags != REL_COND && pool_match_dep(pool, rd1->evr, d2)) -+ if (rd1->flags != REL_COND && rd1->flags != REL_WITHOUT && pool_match_dep(pool, rd1->evr, d2)) - return 1; - return 0; - } -@@ -837,7 +841,7 @@ pool_match_dep(Pool *pool, Id d1, Id d2) - { - /* we use potentially matches for complex deps */ - rd2 = GETRELDEP(pool, d2); -- if (rd2->flags == REL_AND || rd2->flags == REL_OR || rd2->flags == REL_WITH || rd2->flags == REL_COND) -+ if (rd2->flags == REL_AND || rd2->flags == REL_OR || rd2->flags == REL_WITH || rd2->flags == REL_WITHOUT || rd2->flags == REL_COND) - { - if (pool_match_dep(pool, d1, rd2->name)) - return 1; -@@ -847,7 +851,7 @@ pool_match_dep(Pool *pool, Id d1, Id d2) - if (rd2->flags != REL_ELSE) - return 0; - } -- if (rd2->flags != REL_COND && pool_match_dep(pool, d1, rd2->evr)) -+ if (rd2->flags != REL_COND && rd2->flags != REL_WITHOUT && pool_match_dep(pool, d1, rd2->evr)) - return 1; - return 0; - } -@@ -1108,7 +1112,21 @@ pool_addrelproviders(Pool *pool, Id d) - wp = 0; - } - break; -- -+ case REL_WITHOUT: -+ wp = pool_whatprovides(pool, name); -+ pp2 = pool_whatprovides_ptr(pool, evr); -+ pp = pool->whatprovidesdata + wp; -+ while ((p = *pp++) != 0) -+ { -+ for (pp3 = pp2; *pp3; pp3++) -+ if (*pp3 == p) -+ break; -+ if (!*pp3) -+ queue_push(&plist, p); /* use it */ -+ else -+ wp = 0; -+ } -+ break; - case REL_AND: - case REL_OR: - case REL_COND: -diff --git a/src/pool.h b/src/pool.h -index 3eeea06..1d15de2 100644 ---- a/src/pool.h -+++ b/src/pool.h -@@ -229,6 +229,7 @@ struct _Pool { - #define REL_MULTIARCH 25 /* debian multiarch annotation */ - #define REL_ELSE 26 /* only as evr part of REL_COND */ - #define REL_ERROR 27 /* parse errors and the like */ -+#define REL_WITHOUT 28 - - #if !defined(__GNUC__) && !defined(__attribute__) - # define __attribute__(x) -diff --git a/src/poolid.c b/src/poolid.c -index 3a8a3c8..de1ce29 100644 ---- a/src/poolid.c -+++ b/src/poolid.c -@@ -178,6 +178,8 @@ pool_id2rel(const Pool *pool, Id id) - return pool->disttype == DISTTYPE_RPM ? " or " : " | "; - case REL_WITH: - return pool->disttype == DISTTYPE_RPM ? " with " : " + "; -+ case REL_WITHOUT: -+ return pool->disttype == DISTTYPE_RPM ? " without " : " - "; - case REL_NAMESPACE: - return " NAMESPACE "; /* actually not used in dep2str */ - case REL_ARCH: -@@ -238,8 +240,8 @@ dep2strcpy(const Pool *pool, char *p, Id id, int oldrel) - { - Reldep *rd = GETRELDEP(pool, id); - int rel = rd->flags; -- if (oldrel == REL_AND || oldrel == REL_OR || oldrel == REL_WITH || oldrel == REL_COND || oldrel == REL_ELSE || oldrel == -1) -- if (rel == REL_AND || rel == REL_OR || rel == REL_WITH || rel == REL_COND || rel == REL_ELSE) -+ if (oldrel == REL_AND || oldrel == REL_OR || oldrel == REL_WITH || oldrel == REL_WITHOUT || oldrel == REL_COND || oldrel == REL_ELSE || oldrel == -1) -+ if (rel == REL_AND || rel == REL_OR || rel == REL_WITH || rel == REL_WITHOUT || rel == REL_COND || rel == REL_ELSE) - if ((oldrel != rel || rel == REL_COND || rel == REL_ELSE) && !(oldrel == REL_COND && rel == REL_ELSE)) - { - *p++ = '('; -diff --git a/src/selection.c b/src/selection.c -index 37c6184..e6ea84b 100644 ---- a/src/selection.c -+++ b/src/selection.c -@@ -890,7 +890,7 @@ matchdep(Pool *pool, Id id, char *rname, int rflags, char *revr, int flags) - if (ISRELDEP(id)) - { - Reldep *rd = GETRELDEP(pool, id); -- if (rd->flags == REL_AND || rd->flags == REL_OR || rd->flags == REL_WITH || rd->flags == REL_COND) -+ if (rd->flags == REL_AND || rd->flags == REL_OR || rd->flags == REL_WITH || rd->flags == REL_WITHOUT || rd->flags == REL_COND) - { - if (matchdep(pool, rd->name, rname, rflags, revr, flags)) - return 1; -@@ -900,7 +900,7 @@ matchdep(Pool *pool, Id id, char *rname, int rflags, char *revr, int flags) - if (rd->flags != REL_ELSE) - return 0; - } -- if (rd->flags != REL_COND && matchdep(pool, rd->evr, rname, rflags, revr, flags)) -+ if (rd->flags != REL_COND && rd->flags != REL_WITHOUT && matchdep(pool, rd->evr, rname, rflags, revr, flags)) - return 1; - return 0; - } --- -2.13.4 - diff --git a/0001-yumobs-remove-bogus-queue_empty-call.patch b/0001-yumobs-remove-bogus-queue_empty-call.patch deleted file mode 100644 index 6d73c30..0000000 --- a/0001-yumobs-remove-bogus-queue_empty-call.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fe64933a5c9125401f0ae3e928c406d19075c202 Mon Sep 17 00:00:00 2001 -From: Michael Schroeder -Date: Fri, 21 Jul 2017 13:38:15 +0200 -Subject: [PATCH] yumobs: remove bogus queue_empty() call - -The queue_empty made the code only create yumobs rules for one -dependency. It's surprising that nobody ran into this bug until now. ---- - src/rules.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/rules.c b/src/rules.c -index 26b93ea..6c28cdd 100644 ---- a/src/rules.c -+++ b/src/rules.c -@@ -3720,7 +3720,6 @@ solver_addyumobsrules(Solver *solv) - #if 0 - printf("checking yumobs for %s\n", pool_solvable2str(pool, s)); - #endif -- queue_empty(&qo); - for (opp = solv->obsoletes_data + solv->obsoletes[p - installed->start]; (op = *opp++) != 0;) - { - Solvable *os = pool->solvables + op; --- -2.13.2 - diff --git a/libsolv.spec b/libsolv.spec index 16090a6..bbb7aab 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -38,20 +38,14 @@ %endif Name: lib%{libname} -Version: 0.6.28 -Release: 8%{?dist} +Version: 0.6.29 +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/commit/fe64933a5c9125401f0ae3e928c406d19075c202 -# https://bugzilla.redhat.com/show_bug.cgi?id=1470922 -Patch0001: 0001-yumobs-remove-bogus-queue_empty-call.patch -# https://github.com/openSUSE/libsolv/commit/7fea982667f20409403e794ab916dbb183681b4b -Patch0002: 0001-Support-REL_WITHOUT.patch - BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig(rpm) @@ -293,6 +287,9 @@ popd %endif %changelog +* Thu Sep 07 2017 Igor Gnatenko - 0.6.29-1 +- Update to 0.6.29 + * Fri Aug 11 2017 Igor Gnatenko - 0.6.28-8 - Rebuilt after RPM update (№ 3) diff --git a/sources b/sources index 4b75e05..1e14377 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsolv-0.6.28.tar.gz) = 1c53bf36a5e3a0df43487b24a1204a31b431818b65ae33231adf9258c1af08590d269a7340662a8c77ad4422be54d915fd650f5dc564a88b8de48f72aaa30f04 +SHA512 (libsolv-0.6.29.tar.gz) = b836deab2622fcc99593bdc613cb467057731a4c8bddfaf7a8642ecb9a1decb48052553fc80b3d6051862fac0a3cfe24d3d8141e0ba91b1c30ea3ae6538387cf