th-rpm
This is an old revision of the document!
Th RPM conversion process to new rpm using internal BDB 4.5 (there were too many problems with BDB 4.6). Conversion is needed because BDB 4.5 cannot read BDB “Hash version 9” format used in BDB 4.6.
BDB 4.5 is able to read “Hash version 8” and “Btree version 9”. Our goal is to convert databases to “Btree version 9” format, upgrade to new rpm, rebuild databases once again and finally live with Hash 8 and/or Btree 9 but NOT Hash 9.
What to do:
- create backup of /var/lib/rpm directory
- install db4.6-utils (so you will have recovery tools when something goes wrong)
- edit existing /usr/lib/rpm/macros file and replace
_dbi_config_XYZ _dbi_htconfig(htconfig) ocurrences with_dbi_btconfigone. Changed part will look like this:
%_dbi_config_Dirnames %{_dbi_btconfig}
%_dbi_config_Requireversion %{_dbi_btconfig}
%_dbi_config_Provideversion %{_dbi_btconfig}
%_dbi_config_Installtid %{_dbi_btconfig}
%_dbi_config_Removetid %{_dbi_btconfig}
%_dbi_config_Basenames %{_dbi_btconfig}
%_dbi_config_Conflictname %{_dbi_btconfig}
%_dbi_config_Filedigests %{_dbi_btconfig}
%_dbi_config_Group %{_dbi_btconfig}
%_dbi_config_Name %{_dbi_btconfig}
%_dbi_config_Packagecolor %{_dbi_btconfig}
%_dbi_config_Providename %{_dbi_btconfig}
%_dbi_config_Pubkeys %{_dbi_btconfig}
%_dbi_config_Requirename %{_dbi_btconfig}
%_dbi_config_Sha1header %{_dbi_btconfig}
%_dbi_config_Sigmd5 %{_dbi_btconfig}
%_dbi_config_Triggername %{_dbi_btconfig}
- delete almost all files in /var/lib/rpm/ leaving only file named “Packages” (s at the end!)
- run
rpm –rebuilddb. You should now see new database files in /var/lib/rpm/. Note that you shouldn't care about __db.XXX files. These are temporary files. - check with
file /var/lib/rpm/*if new databases are one of these:- Berkeley DB (Hash, version 8, native byte-order)
- Berkeley DB (Btree, version 9, native byte-order)
then everything is OK.
if you still have "Berkeley DB (Hash, version 9, native byte-order)" then there is a problem. Consult with [[http://lists.pld-linux.org/|PLD mailing list]] subscribers upgrade rpm package to latest available run ''rpm --rebuilddb'' again to get Hash 8/Btree 9 type of databases
th-rpm.1195089803.txt.gz · Last modified: 2007-11-15 02:23 by arekm