Backport patch to fix dnf --debugsolver crash (RHBZ #1361831)

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2016-08-03 12:33:54 +02:00
parent 10bb86621e
commit 30c4657158
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,39 @@
From e7e1881574996abed4ac46eac3ebb504004eb29a Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Date: Sun, 31 Jul 2016 18:54:33 +0200
Subject: [PATCH] testcase: replace i with repoid
looks like it was typo.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1361831
Closes: https://github.com/openSUSE/libsolv/issues/150
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
ext/testcase.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ext/testcase.c b/ext/testcase.c
index 52c139f..5749dfa 100644
--- a/ext/testcase.c
+++ b/ext/testcase.c
@@ -2328,7 +2328,7 @@ testcase_write(Solver *solv, const char *dir, int resultflags, const char *testc
Repo *repo = pool_id2repo(pool, repoid);
char *buf = solv_malloc((repo->name ? strlen(repo->name) : 0) + 40);
char *mp;
- orignames[i] = repo->name;
+ orignames[repoid] = repo->name;
if (!repo->name || !repo->name[0])
sprintf(buf, "#%d", repoid);
else
@@ -2353,7 +2353,7 @@ testcase_write(Solver *solv, const char *dir, int resultflags, const char *testc
{
Repo *repo = pool_id2repo(pool, repoid);
solv_free((void *)repo->name);
- repo->name = orignames[i];
+ repo->name = orignames[repoid];
}
solv_free(orignames);
return r;
--
2.7.4

View File

@ -53,13 +53,15 @@
Name: lib%{libname} Name: lib%{libname}
Version: 0.6.23 Version: 0.6.23
Release: 1%{?dist} Release: 2%{?dist}
Summary: Package dependency solver Summary: Package dependency solver
License: BSD License: BSD
URL: https://github.com/openSUSE/libsolv URL: https://github.com/openSUSE/libsolv
Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0001: 0001-testcase-replace-i-with-repoid.patch
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig(rpm) BuildRequires: pkgconfig(rpm)
@ -307,6 +309,9 @@ popd
%endif %endif
%changelog %changelog
* Wed Aug 03 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.23-2
- Backport patch to fix dnf --debugsolver crash (RHBZ #1361831)
* Wed Jul 27 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.23-1 * Wed Jul 27 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.6.23-1
- Update to 0.6.23 - Update to 0.6.23