Update to 0.7.25
This commit is contained in:
parent
57fddd3288
commit
561bd7cf65
1
.gitignore
vendored
1
.gitignore
vendored
@ -62,3 +62,4 @@
|
|||||||
/libsolv-0.7.21.tar.gz
|
/libsolv-0.7.21.tar.gz
|
||||||
/libsolv-0.7.22.tar.gz
|
/libsolv-0.7.22.tar.gz
|
||||||
/libsolv-0.7.24.tar.gz
|
/libsolv-0.7.24.tar.gz
|
||||||
|
/libsolv-0.7.25.tar.gz
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
From 1edb35a3bd9abcede3a200471a4d1868f8054c99 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Tue, 18 Apr 2023 11:57:50 +0200
|
|
||||||
Subject: [PATCH 1/5] Treat condition both as positive and negative literal in
|
|
||||||
pool_add_pos_literals_complex_dep
|
|
||||||
|
|
||||||
That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and
|
|
||||||
(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both
|
|
||||||
cases we have A, B, ~B, C.
|
|
||||||
|
|
||||||
This resolves issue #527
|
|
||||||
---
|
|
||||||
src/cplxdeps.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/src/cplxdeps.c b/src/cplxdeps.c
|
|
||||||
index 6c40752e..26e754d9 100644
|
|
||||||
--- a/src/cplxdeps.c
|
|
||||||
+++ b/src/cplxdeps.c
|
|
||||||
@@ -405,6 +405,7 @@ pool_add_pos_literals_complex_dep(Pool *pool, Id dep, Queue *q, Map *m, int neg)
|
|
||||||
Reldep *rd2 = GETRELDEP(pool, rd->evr);
|
|
||||||
if (rd2->flags == REL_ELSE)
|
|
||||||
{
|
|
||||||
+ pool_add_pos_literals_complex_dep(pool, rd2->name, q, m, !neg);
|
|
||||||
pool_add_pos_literals_complex_dep(pool, rd2->evr, q, m, !neg);
|
|
||||||
dep = rd2->name;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From 47734e26d67ad236a29c160ff224fcb1910e3a6f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Tue, 18 Apr 2023 12:36:40 +0200
|
|
||||||
Subject: [PATCH 2/5] Add testcase for last commit
|
|
||||||
|
|
||||||
---
|
|
||||||
test/testcases/cplxdeps/ifelse_rec.t | 10 ++++++++++
|
|
||||||
1 file changed, 10 insertions(+)
|
|
||||||
create mode 100644 test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
|
|
||||||
diff --git a/test/testcases/cplxdeps/ifelse_rec.t b/test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000..ea467027
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
@@ -0,0 +1,10 @@
|
|
||||||
+repo appstream 0 testtags <inline>
|
|
||||||
+#>=Pkg: xorg-x11-server-Xorg 1.20.11 18.el9 noarch
|
|
||||||
+#>=Req: missing-req
|
|
||||||
+#>=Pkg: pass 1.7.4 6.el9 noarch
|
|
||||||
+#>=Rec: xclip <IF> (xorg-x11-server-Xorg <ELSE> wl-clipboard)
|
|
||||||
+repo @System 0 empty
|
|
||||||
+system unset * @System
|
|
||||||
+job install pkg pass-1.7.4-6.el9.noarch@appstream
|
|
||||||
+result transaction,problems <inline>
|
|
||||||
+#>install pass-1.7.4-6.el9.noarch@appstream
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
From fd326d72a1515ab696e2dea535bc49f02752b46e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Wed, 19 Apr 2023 09:50:58 +0200
|
|
||||||
Subject: [PATCH 3/5] Add 'feature complex_deps' to ifelse_rec.t testcase
|
|
||||||
|
|
||||||
---
|
|
||||||
test/testcases/cplxdeps/ifelse_rec.t | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/test/testcases/cplxdeps/ifelse_rec.t b/test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
index ea467027..3e052ebe 100644
|
|
||||||
--- a/test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
+++ b/test/testcases/cplxdeps/ifelse_rec.t
|
|
||||||
@@ -1,3 +1,4 @@
|
|
||||||
+feature complex_deps
|
|
||||||
repo appstream 0 testtags <inline>
|
|
||||||
#>=Pkg: xorg-x11-server-Xorg 1.20.11 18.el9 noarch
|
|
||||||
#>=Req: missing-req
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
|||||||
From 634371f143e5c0d4244dd46084d0aa7ccdb3967c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Wed, 19 Apr 2023 13:09:10 +0200
|
|
||||||
Subject: [PATCH 4/5] Allow to break arch lock-step on erase operations
|
|
||||||
|
|
||||||
We allow it if SOLVER_SETARCH is (auto-)set in the erase job.
|
|
||||||
---
|
|
||||||
src/rules.c | 26 ++++++++++++++++++++++++++
|
|
||||||
1 file changed, 26 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/rules.c b/src/rules.c
|
|
||||||
index 05891c03..2105c968 100644
|
|
||||||
--- a/src/rules.c
|
|
||||||
+++ b/src/rules.c
|
|
||||||
@@ -1672,6 +1672,16 @@ solver_addinfarchrules(Solver *solv, Map *addedmap)
|
|
||||||
if (first)
|
|
||||||
continue; /* not the first in the group */
|
|
||||||
|
|
||||||
+ if (!bestscore && allowedarchs.count > 1 && pool->implicitobsoleteusescolors)
|
|
||||||
+ {
|
|
||||||
+ for (j = 0; j < allowedarchs.count; j++)
|
|
||||||
+ {
|
|
||||||
+ a = pool_arch2score(pool, allowedarchs.elements[j]);
|
|
||||||
+ if (a && a != 1 && (!bestscore || a < bestscore))
|
|
||||||
+ bestscore = a;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!bestscore)
|
|
||||||
continue; /* did not find a score for this group */
|
|
||||||
|
|
||||||
@@ -2578,6 +2588,20 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
|
|
||||||
case SOLVER_ERASE:
|
|
||||||
if (!installed)
|
|
||||||
break;
|
|
||||||
+ set = how & SOLVER_SETMASK;
|
|
||||||
+ if (!(set & (SOLVER_NOAUTOSET | SOLVER_SETARCH)) && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
|
|
||||||
+ {
|
|
||||||
+ if (select == SOLVER_SOLVABLE)
|
|
||||||
+ set |= SOLVER_SETARCH;
|
|
||||||
+ else if ((select == SOLVER_SOLVABLE_NAME || select == SOLVER_SOLVABLE_PROVIDES) && ISRELDEP(what))
|
|
||||||
+ {
|
|
||||||
+ Reldep *rd = GETRELDEP(pool, what);
|
|
||||||
+ if (rd->flags <= 7 && ISRELDEP(rd->name))
|
|
||||||
+ rd = GETRELDEP(pool, rd->name);
|
|
||||||
+ if (rd->flags == REL_ARCH)
|
|
||||||
+ set |= SOLVER_SETARCH;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid))
|
|
||||||
{
|
|
||||||
FOR_REPO_SOLVABLES(installed, p, s)
|
|
||||||
@@ -2587,6 +2611,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
|
|
||||||
if (pool->solvables[p].repo == installed)
|
|
||||||
{
|
|
||||||
queue_push2(q, DISABLE_UPDATE, p);
|
|
||||||
+ if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
|
|
||||||
+ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
|
|
||||||
#ifdef ENABLE_LINKED_PKGS
|
|
||||||
if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1)
|
|
||||||
queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]);
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
|||||||
From 5dc4f81fda718df26f8f5dda343a71d34cf555b4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Fri, 21 Apr 2023 16:15:10 +0200
|
|
||||||
Subject: [PATCH 5/5] Only disable infarch rules on erase if the package was in
|
|
||||||
lock-step
|
|
||||||
|
|
||||||
Fiexes issue #528
|
|
||||||
---
|
|
||||||
src/rules.c | 28 +++++++++++++++++++++++++++-
|
|
||||||
1 file changed, 27 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/rules.c b/src/rules.c
|
|
||||||
index 2105c968..660656f0 100644
|
|
||||||
--- a/src/rules.c
|
|
||||||
+++ b/src/rules.c
|
|
||||||
@@ -2367,6 +2367,31 @@ reenablerepopriorule(Solver *solv, Id name)
|
|
||||||
#define DISABLE_BLACK 4
|
|
||||||
#define DISABLE_REPOPRIO 5
|
|
||||||
|
|
||||||
+/* check if installed package p is in lock-step with another installed package */
|
|
||||||
+static int
|
|
||||||
+installed_is_in_lockstep(Solver *solv, Id p)
|
|
||||||
+{
|
|
||||||
+ Pool *pool = solv->pool;
|
|
||||||
+ Repo *installed = solv->installed;
|
|
||||||
+ int rid;
|
|
||||||
+ Id pp, l;
|
|
||||||
+ Rule *r;
|
|
||||||
+
|
|
||||||
+ if (!installed)
|
|
||||||
+ return 0;
|
|
||||||
+ for (rid = solv->infarchrules, r = solv->rules + rid; rid < solv->infarchrules_end; rid++, r++)
|
|
||||||
+ {
|
|
||||||
+ if (r->p >= 0)
|
|
||||||
+ continue;
|
|
||||||
+ if (pool->solvables[-r->p].repo != installed)
|
|
||||||
+ continue;
|
|
||||||
+ FOR_RULELITERALS(l, pp, r)
|
|
||||||
+ if (l == p)
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static void
|
|
||||||
jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
|
|
||||||
{
|
|
||||||
@@ -2612,7 +2637,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q)
|
|
||||||
{
|
|
||||||
queue_push2(q, DISABLE_UPDATE, p);
|
|
||||||
if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end)
|
|
||||||
- queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
|
|
||||||
+ if (installed_is_in_lockstep(solv, p))
|
|
||||||
+ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */
|
|
||||||
#ifdef ENABLE_LINKED_PKGS
|
|
||||||
if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1)
|
|
||||||
queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]);
|
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
@ -1,92 +0,0 @@
|
|||||||
From 296f854b7a9d4b83f6ecb1fc0626511132bf53cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michael Schroeder <mls@suse.de>
|
|
||||||
Date: Thu, 20 Jul 2023 11:50:00 +0200
|
|
||||||
Subject: [PATCH] Save memory in repo_updateinfoxml by not interleaving
|
|
||||||
repo_addflexarray calls
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Mixing repo_addflexarray calls will make the code moving the arrays
|
|
||||||
in the idarraydata all the time as it cannot append to the arrays.
|
|
||||||
So first collect the array contents of the collection flexarray and
|
|
||||||
then add it in one go.
|
|
||||||
|
|
||||||
This is based on pull request #533 by Aleš Matěj <amatej@redhat.com>.
|
|
||||||
---
|
|
||||||
ext/repo_updateinfoxml.c | 22 ++++++++++++++--------
|
|
||||||
1 file changed, 14 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/ext/repo_updateinfoxml.c b/ext/repo_updateinfoxml.c
|
|
||||||
index 22f7093d..0725f033 100644
|
|
||||||
--- a/ext/repo_updateinfoxml.c
|
|
||||||
+++ b/ext/repo_updateinfoxml.c
|
|
||||||
@@ -113,7 +113,7 @@ struct parsedata {
|
|
||||||
Id pkghandle;
|
|
||||||
struct solv_xmlparser xmlp;
|
|
||||||
struct joindata jd;
|
|
||||||
- Id collhandle;
|
|
||||||
+ Queue collectionq;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -289,9 +289,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STATE_COLLECTION:
|
|
||||||
- {
|
|
||||||
- pd->collhandle = repodata_new_handle(pd->data);
|
|
||||||
- }
|
|
||||||
+ queue_empty(&pd->collectionq);
|
|
||||||
break;
|
|
||||||
|
|
||||||
/* <package arch="ppc64" name="imlib-debuginfo" release="6.fc8"
|
|
||||||
@@ -371,7 +369,7 @@ startElement(struct solv_xmlparser *xmlp, int state, const char *name, const cha
|
|
||||||
if (arch)
|
|
||||||
repodata_set_poolstr(pd->data, module_handle, UPDATE_MODULE_ARCH, arch);
|
|
||||||
repodata_add_flexarray(pd->data, pd->handle, UPDATE_MODULE, module_handle);
|
|
||||||
- repodata_add_flexarray(pd->data, pd->collhandle, UPDATE_MODULE, module_handle);
|
|
||||||
+ queue_push2(&pd->collectionq, UPDATE_MODULE, module_handle);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -436,13 +434,19 @@ endElement(struct solv_xmlparser *xmlp, int state, char *content)
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STATE_COLLECTION:
|
|
||||||
- repodata_add_flexarray(pd->data, pd->handle, UPDATE_COLLECTIONLIST, pd->collhandle);
|
|
||||||
- pd->collhandle = 0;
|
|
||||||
+ {
|
|
||||||
+ Id collhandle = repodata_new_handle(pd->data);
|
|
||||||
+ int i;
|
|
||||||
+ for (i = 0; i < pd->collectionq.count; i += 2)
|
|
||||||
+ repodata_add_flexarray(pd->data, collhandle, pd->collectionq.elements[i], pd->collectionq.elements[i + 1]);
|
|
||||||
+ repodata_add_flexarray(pd->data, pd->handle, UPDATE_COLLECTIONLIST, collhandle);
|
|
||||||
+ queue_empty(&pd->collectionq);
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
|
|
||||||
case STATE_PACKAGE:
|
|
||||||
repodata_add_flexarray(pd->data, pd->handle, UPDATE_COLLECTION, pd->pkghandle);
|
|
||||||
- repodata_add_flexarray(pd->data, pd->collhandle, UPDATE_COLLECTION, pd->pkghandle);
|
|
||||||
+ queue_push2(&pd->collectionq, UPDATE_COLLECTION, pd->pkghandle);
|
|
||||||
pd->pkghandle = 0;
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -499,11 +503,13 @@ repo_add_updateinfoxml(Repo *repo, FILE *fp, int flags)
|
|
||||||
pd.pool = pool;
|
|
||||||
pd.repo = repo;
|
|
||||||
pd.data = data;
|
|
||||||
+ queue_init(&pd.collectionq);
|
|
||||||
solv_xmlparser_init(&pd.xmlp, stateswitches, &pd, startElement, endElement);
|
|
||||||
if (solv_xmlparser_parse(&pd.xmlp, fp) != SOLV_XMLPARSER_OK)
|
|
||||||
pd.ret = pool_error(pool, -1, "repo_updateinfoxml: %s at line %u:%u", pd.xmlp.errstr, pd.xmlp.line, pd.xmlp.column);
|
|
||||||
solv_xmlparser_free(&pd.xmlp);
|
|
||||||
join_freemem(&pd.jd);
|
|
||||||
+ queue_free(&pd.collectionq);
|
|
||||||
|
|
||||||
if (!(flags & REPO_NO_INTERNALIZE))
|
|
||||||
repodata_internalize(data);
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
10
libsolv.spec
10
libsolv.spec
@ -26,7 +26,7 @@
|
|||||||
%define __cmake_switch(b:) %[%{expand:%%{?with_%{-b*}}} ? "ON" : "OFF"]
|
%define __cmake_switch(b:) %[%{expand:%%{?with_%{-b*}}} ? "ON" : "OFF"]
|
||||||
|
|
||||||
Name: lib%{libname}
|
Name: lib%{libname}
|
||||||
Version: 0.7.24
|
Version: 0.7.25
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Package dependency solver
|
Summary: Package dependency solver
|
||||||
|
|
||||||
@ -128,14 +128,6 @@ Python bindings for the %{name} library.
|
|||||||
Python 3 version.
|
Python 3 version.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patchlist
|
|
||||||
0001-Treat-condition-both-as-positive-and-negative-litera.patch
|
|
||||||
0002-Add-testcase-for-last-commit.patch
|
|
||||||
0003-Add-feature-complex_deps-to-ifelse_rec.t-testcase.patch
|
|
||||||
0004-Allow-to-break-arch-lock-step-on-erase-operations.patch
|
|
||||||
0005-Only-disable-infarch-rules-on-erase-if-the-package-w.patch
|
|
||||||
0006-Save-memory-in-repo_updateinfoxml-by-not-interleavin.patch
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libsolv-0.7.24.tar.gz) = a0975d3f80ae8c364d5b32df4c26bc7eb5abb3be81259595848f1f5f74b00e708af3153074041d49383547718e68cee2e82cf4bdeab6221dfdcc605812689d37
|
SHA512 (libsolv-0.7.25.tar.gz) = 46e2ab352831add489aab19ff67821530fcb43c3edcbb824ee1afc7c8e802d86d6ac6491eb5520e5f44dcd01ea01fc4fe8adb4de356a2892fe77574f02611ff3
|
||||||
|
Loading…
Reference in New Issue
Block a user