SPECS (rpm-4_4_9-internal_bdb): rpm.spec - convertion check

arekm arekm at pld-linux.org
Thu Nov 15 02:02:01 CET 2007


Author: arekm                        Date: Thu Nov 15 01:02:01 2007 GMT
Module: SPECS                         Tag: rpm-4_4_9-internal_bdb
---- Log message:
- convertion check

---- Files affected:
SPECS:
   rpm.spec (1.837.2.5.2.5 -> 1.837.2.5.2.6) 

---- Diffs:

================================================================
Index: SPECS/rpm.spec
diff -u SPECS/rpm.spec:1.837.2.5.2.5 SPECS/rpm.spec:1.837.2.5.2.6
--- SPECS/rpm.spec:1.837.2.5.2.5	Thu Nov 15 01:48:55 2007
+++ SPECS/rpm.spec	Thu Nov 15 02:01:56 2007
@@ -273,6 +273,8 @@
 %{?with_selinux:Requires:	libselinux >= 1.18}
 %{?with_system_libmagic:Requires:	libmagic >= 1.15-2}
 Requires:	popt >= %{reqpopt_ver}
+# for %%pre check
+Requires(pre):	file
 Obsoletes:	rpm-libs
 # avoid SEGV caused by mixed db versions
 Conflicts:	poldek < 0.18.1-16
@@ -996,6 +998,15 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+# make sure no one install this rpm over old rpm using system db 4.6
+%pre lib
+if (%{_bindir}/file /var/lib/rpm/* 2> /dev/null | /bin/grep -q 'Hash, version 9'); then
+	echo >&2 "BDB Hash 9 detected. Unsupported by this version. Please convert"
+	echo >&2 "your rpm database to Btree format and then upgrade rpm tool."
+	echo >&2 "See http://www.pld-linux.org/Th-RPM for instructions."
+	exit 1
+fi
+
 %post	lib -p /sbin/ldconfig
 %postun lib -p /sbin/ldconfig
 
@@ -1221,6 +1232,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.837.2.5.2.6  2007-11-15 01:01:56  arekm
+- convertion check
+
 Revision 1.837.2.5.2.5  2007-11-15 00:48:55  arekm
 - apply nopie patch
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/rpm.spec?r1=1.837.2.5.2.5&r2=1.837.2.5.2.6&f=u



More information about the pld-cvs-commit mailing list