Bug 7751
Summary: | rpm requires rpmrc for even `rpm --help` ?!? | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Marc Tamsky <marc-redhatbugzilla20060919> |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED WONTFIX | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.2 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 1999-12-12 01:02:05 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Marc Tamsky
1999-12-11 08:37:47 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. 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.
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. 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 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. |