summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-12-18 03:14:08 +0000
committerjbj <devnull@localhost>2003-12-18 03:14:08 +0000
commitb0fc5b445f6a2c82fefb1706825ee6a6e9503661 (patch)
treec240959ca8f1c4ab6a3751e9838df6efac54d855
parent60207c0346637a32b792e371436eeb731665409e (diff)
downloadlibrpm-tizen-b0fc5b445f6a2c82fefb1706825ee6a6e9503661.tar.gz
librpm-tizen-b0fc5b445f6a2c82fefb1706825ee6a6e9503661.tar.bz2
librpm-tizen-b0fc5b445f6a2c82fefb1706825ee6a6e9503661.zip
- detect (and remove) dbenv files while upgrading to db-4.2.52.
- fix: dangling pointer brain fart (#107835). CVS patchset: 6976 CVS date: 2003/12/18 03:14:08
-rw-r--r--CHANGES10
-rw-r--r--rpm.spec.in34
-rw-r--r--rpmdb/rpmdb.c8
3 files changed, 38 insertions, 14 deletions
diff --git a/CHANGES b/CHANGES
index af7db6d3f..3867ba29a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,14 +1,20 @@
-4.2 -> 4.3:
+4.2.2 -> 4.3:
- upgrade to zlib-1.2.beta7.
- fix: short option help missing string terminator.
- - unify signal handling in librpmio, use condvar to deliver signal.
- permit secondary tag match patterns with RPMQV_ALL.
- fix: cut-n-paste error setting nopromote for Conflicts: (#81965).
- don't use error string after gzclose (Dmitry V. Levin).
- only internal Berkeley db from now on.
- revive "make dist".
+
+4.2.1 -> 4.2.2:
+ - unify signal handling in librpmio, use condvar to deliver signal.
+ - make peace with libtool-1.5, autoconf-2.59, automake-1.8.
- build with db-4.2.52 internal.
- refresh bsddb.
+ - detect (and remove) dbenv files while upgrading to db-4.2.52.
+ - ensure that librpmdb links against just built, not system, librpmio.
+ - fix: dangling pointer brain fart (#107835).
4.2 -> 4.2.1:
- fix: nested %if handling, optind initialization posix vs. glibc.
diff --git a/rpm.spec.in b/rpm.spec.in
index d5d4b61ad..8178bb155 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -20,7 +20,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.2
+Release: 0.3
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
License: GPL
@@ -216,7 +216,18 @@ exit 0
%post
%ifos linux
/sbin/ldconfig
+
+# Establish correct rpmdb ownership.
/bin/chown @RPMUSER@.@RPMGROUP@ /var/lib/rpm/[A-Z]*
+
+# XXX Detect (and remove) incompatible dbenv files during db-4.2.52 upgrade.
+# XXX Removing dbenv files in %%post opens a lock race window, a tolerable
+# XXX risk compared to the support issues involved with upgrading Berkeley DB.
+[ -w /var/lib/rpm/__db.001 ] &&
+/usr/lib/rpm/rpmdb_stat -CA -h /var/lib/rpm 2>&1 |
+grep "db_stat: Program version 4.2 doesn't match environment version" 2>&1 > /dev/null &&
+ rm -f /var/lib/rpm/__db*
+
%endif
exit 0
@@ -320,6 +331,15 @@ exit 0
%endif
%attr(-, @RPMUSER@, @RPMGROUP@) %{__prefix}/lib/rpm/noarch*
+%rpmattr %{__prefix}/lib/rpm/rpmdb_deadlock
+%rpmattr %{__prefix}/lib/rpm/rpmdb_dump
+%rpmattr %{__prefix}/lib/rpm/rpmdb_load
+%rpmattr %{__prefix}/lib/rpm/rpmdb_loadcvt
+%rpmattr %{__prefix}/lib/rpm/rpmdb_svc
+%rpmattr %{__prefix}/lib/rpm/rpmdb_stat
+%rpmattr %{__prefix}/lib/rpm/rpmdb_verify
+%rpmattr %{__prefix}/lib/rpm/rpmfile
+
%lang(cs) %{__prefix}/*/locale/cs/LC_MESSAGES/rpm.mo
%lang(da) %{__prefix}/*/locale/da/LC_MESSAGES/rpm.mo
%lang(de) %{__prefix}/*/locale/de/LC_MESSAGES/rpm.mo
@@ -425,14 +445,6 @@ exit 0
%{__mandir}/man8/rpmcache.8*
%{__mandir}/man8/rpmgraph.8*
%rpmattr %{__prefix}/lib/rpm/rpmcache
-%rpmattr %{__prefix}/lib/rpm/rpmdb_deadlock
-%rpmattr %{__prefix}/lib/rpm/rpmdb_dump
-%rpmattr %{__prefix}/lib/rpm/rpmdb_load
-%rpmattr %{__prefix}/lib/rpm/rpmdb_loadcvt
-%rpmattr %{__prefix}/lib/rpm/rpmdb_svc
-%rpmattr %{__prefix}/lib/rpm/rpmdb_stat
-%rpmattr %{__prefix}/lib/rpm/rpmdb_verify
-%rpmattr %{__prefix}/lib/rpm/rpmfile
%rpmattr %{__bindir}/rpmgraph
%files -n popt
@@ -476,6 +488,10 @@ exit 0
%{__includedir}/popt.h
%changelog
+* Wed Dec 17 2003 Jeff Johnson <jbj@jbj.org> 4.2-0.3
+- detect (and remove) dbenv files while upgrading to db-4.2.52.
+- fix: dangling pointer brain fart (#107835).
+
* Sun Dec 7 2003 Jeff Johnson <jbj@jbj.org> 4.3-0.2
- only internal Berkeley db from now on.
- revive "make dist".
diff --git a/rpmdb/rpmdb.c b/rpmdb/rpmdb.c
index da948daf7..0205b8107 100644
--- a/rpmdb/rpmdb.c
+++ b/rpmdb/rpmdb.c
@@ -2188,11 +2188,10 @@ top:
/*@-boundsread -branchstate -sizeoftype @*/
if (mi->mi_hdrchk && mi->mi_ts) {
rpmRC rpmrc = RPMRC_NOTFOUND;
- pbm_set * set = NULL;
/* Don't bother re-checking a previously read header. */
if (mi->mi_db->db_bits) {
- set = PBM_REALLOC((pbm_set **)&mi->mi_db->db_bits,
+ pbm_set * set = PBM_REALLOC((pbm_set **)&mi->mi_db->db_bits,
&mi->mi_db->db_nbits, mi->mi_offset);
if (PBM_ISSET(mi->mi_offset, set))
rpmrc = RPMRC_OK;
@@ -2211,8 +2210,11 @@ top:
msg = _free(msg);
/* Mark header checked. */
- if (set && rpmrc == RPMRC_OK)
+ if (set && rpmrc == RPMRC_OK) {
+ pbm_set * set = PBM_REALLOC((pbm_set **)&mi->mi_db->db_bits,
+ &mi->mi_db->db_nbits, mi->mi_offset);
PBM_SET(mi->mi_offset, set);
+ }
/* Skip damaged and inconsistent headers. */
if (rpmrc == RPMRC_FAIL)