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.
This is a packaging, not an rpm, problem ATM, as the symlink created by alternatives is not contained in the package.
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.
Bill, how can this be done so that alternatives is happy?
That's the normal error for querying dangling symlinks that aren't included in any package.
Changing component to alternatives, since this affects all packages that use it. (Or, I would if there was a bugzilla component for it..)
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.
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.
Still exists in FC rpm - basically in query.c RPMQV_PATH handling access check returns ENOENT and we check errno first.
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.