Bug 20286
Summary: | RPM has cryptic and non standard error messages | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | kestes |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | asundell+rhbz, dr |
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: | 2002-06-05 18:29:56 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
kestes
2000-11-03 16:08:07 UTC
As a specific and supporting example of this bug (on RedHat 7.3/rpm-4.0.4): # ls nss_db.spec nss_db.spec # rpm -bp nss_db.spec nss_db.spec: No such file or directory ...when what really happens is: # strace rpm -bp nss_db.spec [...] execve("/usr/lib/rpm/rpmb", ["/usr/lib/rpm/rpmb", "-bp", "nss_db.spec"], [/* 20 vars */]) = -1 ENOENT (No such file or directory) write(2, "nss_db.spec: No such file or dir"..., 39nss_db.spec: No such file or directory ) = 39 _exit(1) = ? Not only is this error message terse, it is misleading, for it is not nss_db.spec that does not exist, but rather /usr/lib/rpm/rpmb. Therefore, at the very least, it should say: /usr/lib/rpm/rpmb: No such file or directory Now, I understand why this error occurred, and, judging by past responses to bugs in this component, I'll probably get flamed by someone at redhat.com for suggesting this, but might it not say something like: rpm: Fatal error: could not exec(/usr/lib/rpm/rpmb): No such file or directory rpm: Maybe you need to install rpm-devel? I'm no error-writing expert, so I'm sure the above could be polished up a bit, but I think that it's fairly reasonable to expect that a program: 1) Give an error that accurately represents what went wrong 2) Clearly identify itself in error messages 3) Clearly identify what it was trying to do when it encountered the error It also seems wise, for certain errors that occur in well-known conditions, to give a polite suggestion for a way that the user can fix the problem. Problem #1: the error messages are much more regular now. Problem #2: the build modes have been moved from rpm into rpmbuild, and the popt aliases that provided backward compatibility (somewhat imperfectly) have been removed as well. Details through "man rpm", Legacy section. |