Update to latest snapshot
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
b375be9f75
commit
ddd177330a
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,3 +33,4 @@
|
|||||||
/libsolv-0.6.28.tar.gz
|
/libsolv-0.6.28.tar.gz
|
||||||
/libsolv-0.6.29.tar.gz
|
/libsolv-0.6.29.tar.gz
|
||||||
/libsolv-0.6.30.tar.gz
|
/libsolv-0.6.30.tar.gz
|
||||||
|
/libsolv-97b8c0c.tar.gz
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
From b89d65e5ca0552b2a33db7c82d72cfc81677588d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Panu Matilainen <pmatilai@redhat.com>
|
|
||||||
Date: Tue, 19 Sep 2017 09:56:36 +0200
|
|
||||||
Subject: [PATCH] Fall back to DB_PRIVATE on DB_VERSION_MISMATCH from rpmdb
|
|
||||||
open
|
|
||||||
|
|
||||||
This happens when libdb or glibc gets updated in the transaction so
|
|
||||||
its version appears newer than the currently used one requiring libdb
|
|
||||||
to reconstruct its environment, but the environment is in use by the
|
|
||||||
running transaction so it can't do that. Since libsolv only opens
|
|
||||||
it for reading, DB_PRIVATE is the lesser evil compared to just failing.
|
|
||||||
Also print out a diagnostic so we don't need to keep guessing whether
|
|
||||||
the fix is in place or not. dbenv->errx() needs to be used for the
|
|
||||||
message to get through in the right context, fprintf() get either eaten
|
|
||||||
or printed long after the fact.
|
|
||||||
---
|
|
||||||
ext/repo_rpmdb.c | 9 ++++++++-
|
|
||||||
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
|
|
||||||
index ceaf351..a0140a0 100644
|
|
||||||
--- a/ext/repo_rpmdb.c
|
|
||||||
+++ b/ext/repo_rpmdb.c
|
|
||||||
@@ -1247,7 +1247,14 @@ opendbenv(struct rpmdbstate *state)
|
|
||||||
{
|
|
||||||
#if defined(FEDORA) || defined(MAGEIA)
|
|
||||||
int serialize_fd = serialize_dbenv_ops(state);
|
|
||||||
- r = dbenv->open(dbenv, dbpath, DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL, 0644);
|
|
||||||
+ int eflags = DB_CREATE|DB_INIT_CDB|DB_INIT_MPOOL;
|
|
||||||
+ r = dbenv->open(dbenv, dbpath, eflags, 0644);
|
|
||||||
+ if (r == DB_VERSION_MISMATCH)
|
|
||||||
+ {
|
|
||||||
+ eflags |= DB_PRIVATE;
|
|
||||||
+ dbenv->errx(dbenv, "warning: DB_VERSION_MISMATCH, retrying with DB_PRIVATE");
|
|
||||||
+ r = dbenv->open(dbenv, dbpath, eflags, 0644);
|
|
||||||
+ }
|
|
||||||
if (serialize_fd >= 0)
|
|
||||||
close(serialize_fd);
|
|
||||||
#else
|
|
||||||
--
|
|
||||||
2.15.0
|
|
||||||
|
|
17
libsolv.spec
17
libsolv.spec
@ -36,16 +36,22 @@
|
|||||||
%bcond_without multi_semantics
|
%bcond_without multi_semantics
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global commitnum 2887
|
||||||
|
%global commit 97b8c0c2cd220b05bf2758803744bf9b58233595
|
||||||
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||||
|
|
||||||
Name: lib%{libname}
|
Name: lib%{libname}
|
||||||
Version: 0.6.30
|
Version: 0.6.30
|
||||||
Release: 2%{?dist}
|
Release: 3%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?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
|
||||||
|
%if %{defined commit}
|
||||||
|
Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
||||||
|
%else
|
||||||
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1483553
|
%endif
|
||||||
Patch0: 0001-Fall-back-to-DB_PRIVATE-on-DB_VERSION_MISMATCH-from-.patch
|
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -155,7 +161,7 @@ Python 3 version.
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1 %{?commit:-n %{name}-%{commit}}
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -288,6 +294,9 @@ popd
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 20 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.6.30-3.git.2887.97b8c0c
|
||||||
|
- Update to latest snapshot
|
||||||
|
|
||||||
* Mon Nov 06 2017 Panu Matilainen <pmatilai@redhat.com> - 0.6.30-2
|
* Mon Nov 06 2017 Panu Matilainen <pmatilai@redhat.com> - 0.6.30-2
|
||||||
- Better error message on DB_VERSION_MISMATCH errors
|
- Better error message on DB_VERSION_MISMATCH errors
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (libsolv-0.6.30.tar.gz) = f04fb1e7de0a7cf390a2a5766119fadf2854cf553ab0f7344591622b743acc1356bba4bb64ead698b696fbcf95220cbfe8c0f8057529c9c5441f49985df188f9
|
SHA512 (libsolv-97b8c0c.tar.gz) = 15ea0880586e147c487fa0fbc54d183871487729ddfa3b79012287fe281ffc6e4c5c1141ec9fcd9cb49a8fe138d1f3562bb606a725a4456a9a1641279dee17c7
|
||||||
|
Loading…
Reference in New Issue
Block a user