diff --git a/.gitignore b/.gitignore index ac6c4b6..f506925 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /libsolv-0.6.28.tar.gz /libsolv-0.6.29.tar.gz /libsolv-0.6.30.tar.gz +/libsolv-97b8c0c.tar.gz diff --git a/0001-Fall-back-to-DB_PRIVATE-on-DB_VERSION_MISMATCH-from-.patch b/0001-Fall-back-to-DB_PRIVATE-on-DB_VERSION_MISMATCH-from-.patch deleted file mode 100644 index d268354..0000000 --- a/0001-Fall-back-to-DB_PRIVATE-on-DB_VERSION_MISMATCH-from-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From b89d65e5ca0552b2a33db7c82d72cfc81677588d Mon Sep 17 00:00:00 2001 -From: Panu Matilainen -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 - diff --git a/libsolv.spec b/libsolv.spec index a518cc5..ac83378 100644 --- a/libsolv.spec +++ b/libsolv.spec @@ -36,16 +36,22 @@ %bcond_without multi_semantics %endif +%global commitnum 2887 +%global commit 97b8c0c2cd220b05bf2758803744bf9b58233595 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: lib%{libname} Version: 0.6.30 -Release: 2%{?dist} +Release: 3%{?commit:.git.%{commitnum}.%{?shortcommit}}%{?dist} Summary: Package dependency solver License: BSD 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 -# https://bugzilla.redhat.com/show_bug.cgi?id=1483553 -Patch0: 0001-Fall-back-to-DB_PRIVATE-on-DB_VERSION_MISMATCH-from-.patch +%endif BuildRequires: cmake BuildRequires: gcc-c++ @@ -155,7 +161,7 @@ Python 3 version. %endif %prep -%autosetup -p1 +%autosetup -p1 %{?commit:-n %{name}-%{commit}} mkdir build %build @@ -288,6 +294,9 @@ popd %endif %changelog +* Mon Nov 20 2017 Igor Gnatenko - 0.6.30-3.git.2887.97b8c0c +- Update to latest snapshot + * Mon Nov 06 2017 Panu Matilainen - 0.6.30-2 - Better error message on DB_VERSION_MISMATCH errors diff --git a/sources b/sources index df67c4c..aadff51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libsolv-0.6.30.tar.gz) = f04fb1e7de0a7cf390a2a5766119fadf2854cf553ab0f7344591622b743acc1356bba4bb64ead698b696fbcf95220cbfe8c0f8057529c9c5441f49985df188f9 +SHA512 (libsolv-97b8c0c.tar.gz) = 15ea0880586e147c487fa0fbc54d183871487729ddfa3b79012287fe281ffc6e4c5c1141ec9fcd9cb49a8fe138d1f3562bb606a725a4456a9a1641279dee17c7