Red Hat Bugzilla – Bug 4664
--rcfile <file> scanning broken
Last modified: 2008-05-01 11:37:51 EDT
Although rpm is a very powerful tool, it can be a major PITA
when it comes to doing some simple things quickly, like
dumping the contents of an rpm into ./ for a quick look.
rpm 3.x no longer takes the rcfile syntax (e.g. ~/.rpmrc),
complaining about ":" etc. Neither man page nor --help
reflect these changes. The --rcfile option is currently no
good, as it will always complain about the syntax in the
file, regardless of whether the old or new syntax is used
(though the error is different). I was trying to set topdir
(I wish there was a command line option for that).
The only file correctly scanned is ~/.rpmmacros with new
syntax. I have reasons why I want to 1) ignore this file and
use a different one instead and 2) not delete/change it
The syntax for --rcfile has changed to not read /usr/lib/rpm/rpmrc
by default. Here are equivalent commands
Old: rpm --rcfile=~/.myrcfile
New: rpm --rcfile=/usr/lib/rpm/rpmrc:~/.myrcfile
All but the arch/os tables and the following 2 tokens have been
replace by macro equivalents:
There are two new tokens in rc files:
include: filename # insert another file
In order to read from something other than standard macro file
locations, you need to do
Then invoke rpm as
rpm --rcfile /some/rcfile
You can now set the macro _topdir from the command line as
rpm --define '_topdir /wherever'
Use $HOME expansion on the invoking command line if you wish to
install in your home directory.