Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 7751 - rpm requires rpmrc for even `rpm --help` ?!?
Summary: rpm requires rpmrc for even `rpm --help` ?!?
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 4.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-12-11 08:37 UTC by Marc Tamsky
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-12-12 01:02:05 UTC


Attachments (Terms of Use)

Description Marc Tamsky 1999-12-11 08:37:47 UTC
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`
first.

For other suggestions... see bug#536

Comment 1 Jeff Johnson 1999-12-11 14:50:59 UTC
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-12 00:47:59 UTC
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-12 01:02:59 UTC
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 06:55:59 UTC
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 12:54:59 UTC
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.