Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 680393

Summary: PackageAPI.delete() should not work on packages which are in repos
Product: [Retired] Pulp Reporter: Daniel Mach <dmach>
Component: z_otherAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: jortel, pkilambi, tsanders
Target Milestone: ---Keywords: Triaged
Target Release: Sprint 21   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 12:07:52 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:
Bug Depends On:    
Bug Blocks: 563609, 647488    

Description Daniel Mach 2011-02-25 12:27:59 UTC
PackageAPI.delete() deletes packages regardless they're in repos or not.
This is very dangerous.
If a package is in a repo, delete() should fail and report this situation to client.
Administrator should manually remove packages from repos before using delete().

Comment 1 Jeff Ortel 2011-03-03 18:15:39 UTC
Fixed: f78fe0d92d70d59ecaf36767eb11b7e5eeb1be0b

Comment 2 Jeff Ortel 2011-03-07 20:43:17 UTC
Build: 0.145

Comment 3 Preethi Thomas 2011-03-31 20:04:22 UTC
verified


[root@preethi upload]# rpm -q pulp
pulp-0.0.159-1.fc14.noarch
[root@preethi upload]# pulp-admin -u admin -p admin content upload /root/upload/gofer-0.27-1.fc14.noarch.rpm -v --nosig
* Starting Content Upload

* Performing Content Uploads to Pulp server
Successfully uploaded [gofer-0.27-1.fc14.noarch.rpm] to server

* Content Upload complete.
[root@preethi upload]# 
[root@preethi upload]# 
[root@preethi upload]# 
[root@preethi upload]# pulp-admin -u admin -p admin content delete -f gofer
Content with filename [gofer] could not be found on server; skipping delete
[root@preethi upload]# 
[root@preethi upload]# pulp-admin -u admin -p admin content delete -f gofer-0.27-1.fc14.noarch.rpm
Successfully deleted content [gofer-0.27-1.fc14.noarch.rpm] from pulp server
[root@preethi upload]# 
[root@preethi upload]# 
[root@preethi upload]# pulp-admin -u admin -p admin content upload /root/upload/gofer-0.27-1.fc14.noarch.rpm -v --nosig -r upload2
* Starting Content Upload

* Performing Content Uploads to Pulp server
Successfully uploaded [gofer-0.27-1.fc14.noarch.rpm] to server

* Performing Repo Associations 
Content association Complete for Repo [upload2]: 
 Packages: 
gofer-0.27-1.fc14.noarch.rpm 
 
 Files: 
None

* Content Upload complete.
[root@preethi upload]# pulp-admin -u admin -p admin content delete -f gofer-0.27-1.fc14.noarch.rpm
Content with filename [gofer-0.27-1.fc14.noarch.rpm] is currently associated a repository; skipping delete

Comment 4 Preethi Thomas 2011-08-16 12:07:52 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:21:15 UTC
Closing with Community Release 15

pulp-0.0.223-4.