Bug 1875

Summary: rpm -f confused too easily
Product: [Retired] Red Hat Linux Reporter: kvajk
Component: rpmAssignee: David Lawrence <dkl>
Status: CLOSED WORKSFORME QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.2   
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: 1999-03-29 22:12:18 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:

Description kvajk 1999-03-29 21:43:11 UTC
The -f option to rpm is not smart enough about figuring out
the filename to look up in the RPM database.

Example:
  $ rpm --version
  RPM version 2.5.5
  $ cd /bin ; rpm -q -f ./sh
  file /bin/./sh is not owned by any package

Note that using realpath() is almost certainly NOT the right
answer.  (For example, if /usr/X11R6 is really a symbolic
link to /mnt/sparedisk/X11R6 or something.)

Thanks!

Comment 1 Jeff Johnson 1999-03-29 22:12:59 UTC
I believe this situation has been improved in later
versions of rpm-2.5.x.

And here's what rpm-2.9x does
	[root@ultra2 /root]# cd /bin
	[root@ultra2 /bin]# rpm -qf ./sh
	bash-1.14.7-15
	[root@ultra2 /bin]#

Comment 2 openshift-github-bot 2015-07-14 18:23:12 UTC
Commits pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/ac49969c0eaf6ce2227245eb00e4ad41487cbcf7
issue1875: make the force pull option configurable in the sti build strategy definition; various upstream documentation clarifications / enhancements; comments around reqs for coding/testing changes that run in the builder pod; fixes after merging (changes lost); incorporate comments from Ben

https://github.com/openshift/origin/commit/e56fd7b770d647d1d3acf7613747d186d232fdae
Merge pull request #3694 from gabemontero/issue1875

Merged by openshift-bot