Bug 1017633

Summary: Trying to remove an rpm which has the wrong filename doesn't work.
Product: [Retired] Pulp Reporter: akegata
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED WORKSFORME QA Contact: pulp-qe-list
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.1.1CC: akegata, mhrivnak, pthomas, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.3.0Flags: akegata: needinfo+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-31 17:39:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description akegata 2013-10-10 09:13:13 UTC
Description of problem:

I have a repo with a couple of rpm's that have filenames that differ from what the metadata says they are called, for instance there is a file called jdk-7u10-linux-x64.rpm that pulp thinks is named jdk-1.7.0_10-fcs.x86_64.rpm.
When I try to remove these rpm's nothing happens, no matter which name I use.


Version-Release number of selected component (if applicable):
pulp-server-2.1.3-1.el6.noarch

How reproducible:
Very.

Steps to Reproduce:
1. Rename jdk-1.7.0_10-fcs.x86_64.rpm to blah.rpm and add it to a repo.
2. pulp-admin rpm repo content rpm --repo-id=reponame --str-eq="filename=jdk-1.7.0_17-fcs.x86_64.rpm"| grep Filename
Filename:     jdk-1.7.0_17-fcs.x86_64.rpm
3. pulp-admin rpm repo content rpm --repo-id=reponame --str-eq="filename=jdk-1.7.0_10-fcs.x86_64.rpm"
4. pulp-admin rpm repo content rpm --repo-id=reponame --str-eq="filename=bla.rpm"
5. pulp-admin orphan list 
+----------------------------------------------------------------------+
                                Summary
+----------------------------------------------------------------------+

Total:  0
6. pulp-admin rpm repo content rpm --repo-id=reponame --str-eq="filename=jdk-1.7.0_10-fcs.x86_64.rpm"| grep Filename
Filename:     jdk-1.7.0_17-fcs.x86_64.rpm

Actual results:
The rpm doesn't get removed from the repo.

Expected results:
The rpm should be removed from the repo.

Additional info:
I guess the problem is that the API matches based on the rpm metadata rather than the actual file name, which causes this problem.

Comment 1 Sayli Karmarkar 2013-10-16 15:55:41 UTC
Moving to on_qa to see if the issue still exists in 2.3.

Comment 2 Michael Hrivnak 2013-10-16 18:19:27 UTC
We need a bit more information.

- in step 1, is this a brand new empty repo?

- I don't see any commands that would remove content, so I'm not sure why you are expecting an rpm to get removed. Did you mis-type one of the steps?

- It looks like steps 2, 3 and 6 are the same, except step 3 lacks the pipe into grep. Was this intentional?

Running through the 6 steps as presented, nothing seems unexpected.

Comment 3 Preethi Thomas 2013-10-31 17:39:10 UTC
closing since I cant reproduce it.