Bug 129704
Summary: | when locking Packages file error message gives wrong reason | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Enrique Perez-Terron <enrio> | ||||
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> | ||||
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Mike McLean <mikem> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2 | CC: | mattdm, nobody+pnasrat | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | i386 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2006-10-25 20:25:52 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: | |||||||
Attachments: |
|
Description
Enrique Perez-Terron
2004-08-11 22:04:16 UTC
Created attachment 102638 [details]
Suggested patch
The patch affects return value of the function db3open() in rpmdb/db3.c.
This function is called from dbiOpen() in rpmdb/rpmdb.c, where the return
value is used in a call to strerror().
The original code sets the return value to 1 independently of the nature of the
failure, while my patch sets it equal to the value of errno.
fcntl locking on Packages uses the Berkeley DB method to get a fdno for locking, which happens to be the fdno of the 1st opened database iirc. All you want is errno returned inline? That does not follow existing (albeit glacial) progress to unifying all synchronous rpm error codes to conform to RPMRC_OK = 0, RPMRC_NOTFOUND = 1, (which is consistent with return 1) The real problem is the error msg, not the return code., as errno can always be accessed by the caller. "Operation not permitted" is perhaps semantically correct even if not useful for diagnosing the details of a problem. I'll diddle up a fix for the error message to display errno instead. Fedora Core 2 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC3 updates or in the FC4 test release, reopen and change the version to match. Closing per previous comment and lack of response. Also note that FC1 and FC2 are no longer supported even by Fedora Legacy. |