Update to 0.6.21

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2016-05-18 23:25:52 +02:00
parent 40dcc1ce53
commit 43be65d4e7
5 changed files with 7 additions and 111 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@
/libsolv-0.6.15.tar.gz
/libsolv-0.6.19.tar.gz
/libsolv-0.6.20.tar.gz
/libsolv-0.6.21.tar.gz

View File

@ -1,27 +0,0 @@
From 599c58bed474c2a68109ff0649f1effa7ff02c45 Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 17 May 2016 11:22:56 +0200
Subject: [PATCH] Fix order of solv_extend arguments in repo_add_rpmmd
Fixes libsolv sometimes segfaulting since commit
d06562f7b70f6ceb7d52e717efd1963ce6e8ecf0
---
ext/repo_rpmmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/repo_rpmmd.c b/ext/repo_rpmmd.c
index 78264cc..d280ba0 100644
--- a/ext/repo_rpmmd.c
+++ b/ext/repo_rpmmd.c
@@ -657,7 +657,7 @@ put_in_cshash(struct parsedata *pd, const unsigned char *key, int keyl, Id id)
}
}
/* a new entry. put in csdata */
- pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1, 1 + keyl + sizeof(Id), 4095);
+ pd->csdata = solv_extend(pd->csdata, pd->ncsdata, 1 + keyl + sizeof(Id), 1, 4095);
d = pd->csdata + pd->ncsdata;
d[0] = keyl - 1;
memcpy(d + 1, key, keyl);
--
2.7.4

View File

@ -1,74 +0,0 @@
From b1014a431541444bcd39c6ec83c1ec935c7f0aae Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 17 May 2016 13:31:58 +0200
Subject: [PATCH] Fix supplements handling when implicitobsoleteusescolors is
set
This currently relys on the infarch lockstep handling a bit. Let's
see if this is enough or we need some better filtering code.
---
src/solver.c | 20 ++++++++++++++++++++
.../supplements_implicitobsoleteusescolors.t | 20 ++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 test/testcases/weakdeps/supplements_implicitobsoleteusescolors.t
diff --git a/src/solver.c b/src/solver.c
index 5da8529..4f849ec 100644
--- a/src/solver.c
+++ b/src/solver.c
@@ -2636,6 +2636,26 @@ solver_run_sat(Solver *solv, int disablerules, int doweak)
dqs.count = j;
}
+ /* implicitobsoleteusescolors doesn't mix well with supplements.
+ * filter supplemented packages where we already decided
+ * to install a different architecture */
+ if (dqs.count && pool->implicitobsoleteusescolors)
+ {
+ for (i = j = 0; i < dqs.count; i++)
+ {
+ Id p2, pp2;
+ p = dqs.elements[i];
+ s = pool->solvables + p;
+ FOR_PROVIDES(p2, pp2, s->name)
+ if (solv->decisionmap[p2] > 0 && pool->solvables[p2].name == s->name && pool->solvables[p2].arch != s->arch)
+ break;
+ if (p2)
+ continue; /* ignore this package */
+ dqs.elements[j++] = p;
+ }
+ dqs.count = j;
+ }
+
/* make dq contain both recommended and supplemented pkgs */
if (dqs.count)
{
diff --git a/test/testcases/weakdeps/supplements_implicitobsoleteusescolors.t b/test/testcases/weakdeps/supplements_implicitobsoleteusescolors.t
new file mode 100644
index 0000000..6de4544
--- /dev/null
+++ b/test/testcases/weakdeps/supplements_implicitobsoleteusescolors.t
@@ -0,0 +1,20 @@
+repo system 0 empty
+repo test 0 testtags <inline>
+#>=Ver: 2.0
+#>=Pkg: A 1 1 noarch
+#>=Pkg: B 1 1 x86_64
+#>=Sup: A
+#>=Pkg: B 1 1 i686
+#>=Sup: A
+#>=Pkg: A2 1 1 noarch
+#>=Pkg: B2 1 1 x86_64
+#>=Sup: A2
+#>=Req: XX
+#>=Pkg: B2 1 1 i686
+#>=Sup: A2
+system x86_64 * system
+poolflags implicitobsoleteusescolors
+job install name A
+
+nextjob
+job install name A2
--
2.7.4

View File

@ -48,21 +48,14 @@
%{nil}
Name: lib%{libname}
Version: 0.6.20
Release: 2%{?dist}
Version: 0.6.21
Release: 1%{?dist}
Summary: Package dependency solver
License: BSD
URL: https://github.com/openSUSE/libsolv
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# https://bugzilla.redhat.com/show_bug.cgi?id=1318662
# https://github.com/openSUSE/libsolv/commit/599c58bed474c2a68109ff0649f1effa7ff02c45
Patch0: 0001-Fix-order-of-solv_extend-arguments-in-repo_add_rpmmd.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1325471
# https://github.com/openSUSE/libsolv/commit/b1014a431541444bcd39c6ec83c1ec935c7f0aae
Patch1: 0001-Fix-supplements-handling-when-implicitobsoleteusesco.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(rpm)
@ -309,6 +302,9 @@ popd
%endif
%changelog
* Wed May 18 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.21-1
- Update to 0.6.21
* Tue May 17 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.20-2
- Backport patch to fix crashing on reading some repos (RHBZ #1318662)
- Backport patch to fix installing multilib packages with weak deps

View File

@ -1 +1 @@
9b8a44e94d048a931db8568f48e9e7f0 libsolv-0.6.20.tar.gz
540ff1dbd48f4b24a018641883500de6 libsolv-0.6.21.tar.gz