User Tools

Site Tools


rpm5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rpm5 [2012-12-11 23:36]
baggins cosmetics
rpm5 [2015-01-13 16:01] (current)
glen [Fixing database problems]
Line 5: Line 5:
 Changes in rpm operation that should interest both users and developers. ​ Changes in rpm operation that should interest both users and developers. ​
  
-==== Upgrading from rpm4 and/or older BDB ====+==== Upgrading from rpm4 and/or older BDB or downgrading from BDB 5.3 ====
  
-Rpm database upgrade is done automatically during package installation,​ so there is need to do anything.\\ //But//, in case that upgrade did not happen for some reason, here is the command to do it manually: ​+Rpm database upgrade/​downgrade ​is done automatically during package installation,​ so there is need to do anything.\\ //But//, in case that upgrade/​downgrade ​did not happen for some reason, here is the command to do it manually: ​
  
 <​code>​ <​code>​
-/​usr/​lib/​rpm/​bin/​dbconvert --rebuilddb+/​usr/​lib/​rpm/​bin/​dbupgrade.sh
 </​code>​ </​code>​
 +
 +Remember to **back up** rpm database before running this script.
  
 ==== Fixing database problems ==== ==== Fixing database problems ====
  
-You can't just do '''​rm -rf /​var/​lib/​rpm/​%%__db*%%'''​ to fix problems anymore, also **--rebuilddb** is largely obsolete in rpm 5 and isn't likely to "​fix"​ anything. Instead do:+You can't just do ''​rm -rf /​var/​lib/​rpm/​%%__db*%%''​ to fix problems anymore, also **%%--rebuilddb%%** is largely obsolete in rpm 5 and isn't likely to "​fix"​ anything. Instead do:
  
 <​code>​ <​code>​
 cd /​var/​lib/​rpm cd /​var/​lib/​rpm
-dbX.Y_recover ​-ev+db5.2_recover ​-ev
 </​code>​ </​code>​
  
 ==== Querying database ==== ==== Querying database ====
  
-The semantics of rpm query option **-f** (**--file**) has changed in rpm 5.x; '''​rpm -q -f <​file-with-path>​'''​ will **not** resolve all symlinks in queried file's path. So the query (assuming ///​usr/​src/​linux//​ is a symlink to ///​usr/​src/​linux-A.B.C-R//​): ​+The semantics of rpm query option **-f** (**%%--file%%**) has changed in rpm 5.x; ''​rpm -q -f <​file-with-path>''​ will **not** resolve all symlinks in queried file's path. So the query (assuming ///​usr/​src/​linux//​ is a symlink to ///​usr/​src/​linux-A.B.C-R//​): ​
  
 <​code>​ <​code>​
Line 30: Line 32:
 </​code>​ </​code>​
  
-That returned //​kernel-headers-A.B.C-R.arch.rpm//​ with old rpm, will return nothing with rpm 5.x. You have to do '''​readlink -f'''​ first, or change to symlinked directory and do relative path query. ​+That returned //​kernel-headers-A.B.C-R.arch.rpm//​ with old rpm, will return nothing with rpm 5.x. You have to do ''​readlink -f''​ first, or change to symlinked directory and do relative path query. ​ 
 + 
 +==== poldek error "Too many open files" ==== 
 + 
 +You have to remove .poldek-cache directory if, after rpm/poldek ugrade, you see error similiar to the following:​ 
 + 
 +<​code>​ 
 +Loading [pndir]th... 
 +Loading [pndir]th... 
 +19616 packages read 
 +Loading [rpmdbcache]/​var/​lib/​rpm... 
 +rpmdb: /​var/​lib/​rpm/​__db.005:​ Too many open files 
 +error: db_init:​db3.c:​1087:​ dbenv->​open(24):​ Too many open files 
 +error: cannot open Packages(0) index: Too many open files(24) 
 +        DB: Berkeley DB 5.2.36: (September 14, 2011) 
 +error: //​var/​lib/​rpm:​ open rpm database failed 
 +Abort 
 +</​code>​
  
 ==== DB_BUFFER_SMALL error messages ==== ==== DB_BUFFER_SMALL error messages ====
  
-You may see errors like this: +If running rpm built with BDB 5.3 you may see errors like this: 
  
 <​code>​ <​code>​
Line 42: Line 61:
 It appears to be some type of a bug in the BerkleyDB 5.3.x. ​ In an attempt to workaround the problem, when we encounter this situation we attempt to adjust the size of the mmap buffer until the call works, or we end up trying 10 times. ​ It appears to be some type of a bug in the BerkleyDB 5.3.x. ​ In an attempt to workaround the problem, when we encounter this situation we attempt to adjust the size of the mmap buffer until the call works, or we end up trying 10 times. ​
  
-If DBI debugging is enabled, additional diagnostics are printed, otherwise a basic retry and success message is added to show that the failure was resolved. ​+If DBI debugging is enabled, additional diagnostics are printed, otherwise a basic retry and success message is added to show that the failure was resolved. 
 + 
 +==== poldek: filesystem marks FHS (cap //) ==== 
 + 
 +<​code>​ 
 +# poldek -u filesystem 
 +Processing dependencies... 
 +filesystem-4.0-1.x86_64 obsoleted by filesystem-4.0-26.x86_64 
 +filesystem-4.0-26.x86_64 marks FHS-2.3-35.x86_64 (cap //) 
 +error: FHS-2.3-35.x86_64:​ equal version installed, give up 
 +</​code>​
  
 +To fix, upgrade poldek, and invoke ''​%%poldek --clean-all%%'',​ as the stored poldek indexes are invalid.
 ===== Vserver maintanance ===== ===== Vserver maintanance =====
  
Line 80: Line 110:
 ==== Excluding dependencies ==== ==== Excluding dependencies ====
  
-Regexp patterns for ''​'%%_noauto*%%'''​ macros changed slightly, and '​('​ must be escaped now, for example:+Regexp patterns for ''​_noauto*''​ macros changed slightly, and '​('​ must be escaped now, for example:
  
 <code rpmspec> <code rpmspec>
Line 110: Line 140:
 ==== changes in triggers ==== ==== changes in triggers ====
  
-Currently ​webapp register ​is [[http://​lists.pld-linux.org/​mailman/​pipermail/​pld-devel-en/​2012-November/​023331.html|broken]] due triggers misbehave. here's quick fix for lighttpd:+in ''​rpm-5.4.10-35'' ​webapp register ​was [[http://​lists.pld-linux.org/​mailman/​pipermail/​pld-devel-en/​2012-November/​023331.html|broken]] due triggers misbehave. here's quick fix for lighttpd:
  
 <code sh> <code sh>
rpm5.1355265397.txt.gz · Last modified: 2012-12-11 23:36 by baggins