Bug 72981 - RFE: rpm -qf /path/to/symlink should follow symlink
RFE: rpm -qf /path/to/symlink should follow symlink
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Depends On:
  Show dependency treegraph
Reported: 2002-08-29 13:42 EDT by Ed Halley
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-14 16:15:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ed Halley 2002-08-29 13:42:51 EDT
It would be helpful if the --query --file options would follow symlinks to offer
more information, especially if the symlink itself is not owned by an rpm.

For example, rpm currently gives:

   $ rpm -qf /etc/rc.d/rc2.d/S10network 
   file /etc/rc.d/rc2.d/S10network is not owned by any package

It would be helpful if rpm did the obvious legwork:

   $ rpm -qf /etc/rc.d/rc2.d/S10network
   file /etc/rc.d/rc2.d/S10network is not owned by any package
   file /etc/rc.d/rc2.d/S10network is a symlink to ../init.d/network

The symlink value may be retrieved with readlink(2).

In the case of symlinks which were owned, I think it should give the following

   $ rpm -qf /path/to/symlink
   file /path/to/symlink is a symlink to ./realfile
Comment 1 Jeff Johnson 2003-01-14 16:15:07 EST
I claim that rpm should manage packages, not the file system.

That means that rpm should not follow symlinks that are
not "owned" by packages.

Adding another line of output to "rpm -qf" output would
break various scripts.

There ain't no easy answer, and alternatives (e.g. /usr/bin/rpm)
implemented through symlinks just make the whole issue even more

Basically, I don't think the additional functionality is worth the effort.

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