Bug 1017633 - Trying to remove an rpm which has the wrong filename doesn't work.
Trying to remove an rpm which has the wrong filename doesn't work.
Status: CLOSED WORKSFORME
Product: Pulp
Classification: Community
Component: rpm-support (Show other bugs)
2.1.1
Unspecified Unspecified
unspecified Severity low
: ---
: 2.3.0
Assigned To: pulp-bugs
pulp-qe-list
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 05:13 EDT by akegata
Modified: 2014-10-27 08:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-31 13:39:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
akegata: needinfo+


Attachments (Terms of Use)

  None (edit)
Description akegata 2013-10-10 05:13:13 EDT
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 11:55:41 EDT
Moving to on_qa to see if the issue still exists in 2.3.
Comment 2 Michael Hrivnak 2013-10-16 14:19:27 EDT
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 13:39:10 EDT
closing since I cant reproduce it.

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