Bug 4664 - --rcfile <file> scanning broken
--rcfile <file> scanning broken
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
Depends On:
  Show dependency treegraph
Reported: 1999-08-23 04:07 EDT by v.kuhlmann
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 1999-08-23 10:26:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description v.kuhlmann 1999-08-23 04:07:46 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
Comment 1 Jeff Johnson 1999-08-23 10:26:59 EDT
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
	macrofiles: /usr/lib/rpm/macros:/etc/rpm/macros:~/.rpmmacros

In order to read from something other than standard macro file
locations, you need to do

	in /some/rcfile:
	    include: /usr/lib/rpm/rpmrc
	    macrofiles: /path/to/macro1:/path/to/macro2:~/.mymacros
	in ~/.mymacros

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.

Note You need to log in before you can comment on or make changes to this bug.