Bug 72981 - RFE: rpm -qf /path/to/symlink should follow symlink
Summary: RFE: rpm -qf /path/to/symlink should follow symlink
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-29 17:42 UTC by Ed Halley
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 21:15:07 UTC
Embargoed:


Attachments (Terms of Use)

Description Ed Halley 2002-08-29 17:42:51 UTC
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
   initscripts-6.67-1

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

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

   $ rpm -qf /path/to/symlink
   mysymlinks-1.0-1
   file /path/to/symlink is a symlink to ./realfile
   myrealfiles-1.0-1

Comment 1 Jeff Johnson 2003-01-14 21:15:07 UTC
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
complicated.

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.