Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 7751 - rpm requires rpmrc for even `rpm --help` ?!?
rpm requires rpmrc for even `rpm --help` ?!?
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 1999-12-11 03:37 EST by Marc Tamsky
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-12-11 20:02:05 EST
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 Marc Tamsky 1999-12-11 03:37:47 EST
I came across a bootstrap situation where I had an rpm binary and rpmrc in
/tmp and was trying to install the RPM package...

I couldn't get `rpm --help` to tell me its syntax for directing it
to the rcfile in /tmp... unless I did a `touch /usr/lib/rpm/rpmrc`

For other suggestions... see bug#536
Comment 1 Jeff Johnson 1999-12-11 09:50:59 EST
This is rpm-2.5.x correct? If so, you are correct that rpm requires
/usr/lib/rpm/rpmrc to exist, even for --help, since the path was hard-wired
in the executable. Rpm-3.0.x extends the --rpmrc option to include
a colon separated list of rpmrc files to read, but the 1st file in the
list (usually /usr/lib/rpm/rpmrc) must still exist even for --help.

BTW, rpm makes extensive use of the popt facility, so many of rpm's commands
are not even resident in the rpm binary, hence the counterintuitive need for
configuration files even for --help.
Comment 2 Marc Tamsky 1999-12-11 19:47:59 EST
I was speaking for both 2.5 and 3.0.x...

> Rpm-3.0.x extends the --rpmrc option to include
> a colon separated list of rpmrc files to read, but the 1st file in the
> list (usually /usr/lib/rpm/rpmrc) must still exist even for --help.

Read what you wrote, and tell me that this isn't a bug.

1. '--help' should provide at least a minimally useful set of feedback
   no matter what the state of "required" configuration files.

2. if everything isn't in place as RPM is expecting, it _should_ tell you
   what you need to do to get a proper '--help' listing.
   -- it should not issue an error message stating only that things are FUBAR.
Comment 3 Jeff Johnson 1999-12-11 20:02:59 EST
I cannot change the legacy behavior -- rpm *needs* the arch/os compatibility
tables from the 1st rpmrc file, hence the requirement that the 1st file exist.

Second, a large number of rpm options are implemented using popt aliases read in
from a set of configuration files. That means that "--help" is not simply a
loop over a set of strings ala getopt_long.
Comment 4 Marc Tamsky 1999-12-12 01:55:59 EST
I understand all the legacy and popt reasons... at a minimum
rpm --help without any config files should print:

rpm: config files missing, use option [--rpmrc filename] if needed
Comment 5 Jeff Johnson 1999-12-12 07:54:59 EST
Which is not a whole lot different than
    bash$ rpm --help
    Unable to open /usr/lib/rpm/rpmrc for reading: No such file or directory.
except that your text creates yet another legacy expectation of how rpm
should behave. The config file /usr/lib/rpm/rpmrc is going to be eliminated,
and the rate limiting step is not coding, but managing legacy expectations.

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