How to force yum to uninstall a package when you change it’s name
By Joao
Use the obsoletes tag in the specfile. This will cause “package-oldname” to be uninstalled before installing “package-renamed”.
Name: package-renamed
Obsoletes: package-oldname
Apache2::Request rpm
By Joao
Not immediately obvious, but if you’re looking for an rpm to install the Apache2::Request module you need perl-libapreq2 (this works in CentOS 5 and I imagine others as well).
yum install perl-libapreq2
Common RPM commands
By Joao
This is my commonly used rpm command reference
Install/Upgrade a package
rpm -Uvh package.rpm
Install an old version of a package
rpm -Uvh --oldpackage oldpackage.rpm
Query which package installed a given file
rpm -qf /bin/cp
To force a package to overwrite conflicting files
rpm -Uvh --replacefiles package.rpm
To list files owned by an installed package
rpm -ql package
List scripts inside rpm file (pre, post scriptlets)
rpm -qp --scripts /tmp/ods-dsc-1.0-18.13201_centos53.noarch.rpm



October 29th, 2009