Bug 60288 - rpm-4.0.4-7x.4 reports "No such file or directory" incorrectly with rpm -q -f
rpm-4.0.4-7x.4 reports "No such file or directory" incorrectly with rpm -q -f
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-24 08:08 EST by Jonathan Kamens
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-05 06:16:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2002-02-24 08:08:19 EST
jik:/usr/share/man/man3!126> ls -l  '/usr/share/man/man1/cancel.1.gz'
lrwxrwxrwx    1 root     root           33 Feb  6 08:45
/usr/share/man/man1/cancel.1.gz -> /etc/alternatives/print-cancelman
jik:/usr/share/man/man3!127> rpm -q -f '/usr/share/man/man1/cancel.1.gz'
error: file /usr/share/man/man1/cancel.1.gz: No such file or directory
jik:/usr/share/man/man3!128> 

Obviously, the file exists, because I just listed it with "ls -l", so rpm's
claim that it does not exist is bogus.  It's true that the link doesn't *point*
to anything, but I didn't ask rpm what it points to -- I asked rpm where the
link itself comes from.
Comment 1 Jeff Johnson 2002-02-24 11:08:52 EST
This is a packaging, not an rpm, problem ATM, as
the symlink created by alternatives is not contained
in the package.
Comment 2 Jonathan Kamens 2002-02-24 13:59:33 EST
No, it's an RPM problem, because what "rpm -q -f" is supposed to say if a file
isn't included in any package is, "File not included in any package", not "No
such file or directory".  I've seen it give the correct error (i.e., "File not
included in any package") in the past.
Comment 3 Tim Waugh 2002-02-26 03:48:06 EST
Bill, how can this be done so that alternatives is happy?
Comment 4 Bill Nottingham 2002-02-26 10:40:54 EST
That's the normal error for querying dangling symlinks that aren't included in
any package.
Comment 5 Tim Waugh 2002-03-04 04:52:33 EST
Changing component to alternatives, since this affects all packages that use it.
(Or, I would if there was a bugzilla component for it..)
Comment 6 Bill Nottingham 2005-02-02 15:39:56 EST
This is not an alternatives problem; if this is to be reopened, it
should be assigned to rpm for the behavior of 'rpm -qf' on a dangling
symlink.
Comment 7 Jonathan Kamens 2005-02-08 00:20:38 EST
It is unpleasant to see Red Hat employees bickering about which
Red-Hat-maintained component is responsible for a problem that is
clearly a bug regardless of which component is at fault.  Rather than
bickering about which of you owns the bug, could you just sit down
together, figure out what the correct behavior should be, and derive
from that desired correct behavior which component needs to be
modified?  Sheesh.
Comment 8 Paul Nasrat 2005-09-29 14:12:06 EDT
Still exists in FC rpm - basically in query.c RPMQV_PATH handling access check
returns ENOENT and we check errno first.
Comment 9 Jeff Johnson 2006-08-05 06:16:19 EDT
Tim: re comment #2 and #5. Adding the alternative path as
      Provides: /usr/share/man/man1/cancel.1.gz
should display the package(s) that create the alternatives symlink. Hardly worth the effort imho.

Fixed (by using lstat rather than access) in rpm cvs, will be in rpm-4.4.7.

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