public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Remove ugly kludges from posttrans script, BDB handles this now
Date: Mon, 23 Nov 2026 09:31:28 GMT	[thread overview]
Message-ID: <179542628899.1.4627120786468722807.rpms-rpm-67d7133dc430@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 67d7133dc4307b238491dbd8476935ba52374910
            Author : Panu Matilainen <pmatilai@redhat.com>
            Date   : 2017-08-24T11:56:54+03:00
            Stats  : +4/-11 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/67d7133dc4307b238491dbd8476935ba52374910?branch=pmatilai-v6

            Log:
            Remove ugly kludges from posttrans script, BDB handles this now

Recent libdb handles environment version mismatch automatically and
does a better job of it than we ever could, don't mess with it.
Other than that, it hasn't been really doing it's alleged job in
many years because first yum and then dnf started doing a separate
verify step after the transaction which recreates the environment...

---
diff --git a/rpm.spec b/rpm.spec
index d1c4eb7..5b2c571 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -37,7 +37,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}6%{?dist}
+Release: %{?snapver:0.%{snapver}.}7%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2
@@ -491,16 +491,6 @@ make check
 %post build-libs -p /sbin/ldconfig
 %postun build-libs -p /sbin/ldconfig
 
-%posttrans
-# XXX this is klunky and ugly, rpm itself should handle this
-dbstat=/usr/lib/rpm/rpmdb_stat
-if [ -x "$dbstat" ]; then
-    if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "doesn't match library version \| Invalid argument"; then
-        rm -f /var/lib/rpm/__db.* 
-    fi
-fi
-exit 0
-
 %files -f %{name}.lang
 %license COPYING
 %doc CREDITS doc/manual/[a-z]*
@@ -642,6 +632,9 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Aug 24 2017 Panu Matilainen <pmatilai@redhat.com> - 4.13.90-0.git14000.7
+- Remove ugly kludges from posttrans script, BDB handles this now
+
 * Fri Aug 18 2017 Panu Matilainen <pmatilai@redhat.com> - 4.13.90-0.git14000.6
 - Silence harmless but bogus error message on noarch packages (#1482144)
 

                 reply	other threads:[~2026-11-23  9:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542628899.1.4627120786468722807.rpms-rpm-67d7133dc430@fedoraproject.org \
    --to=pmatilai@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox