Bug 680393 - PackageAPI.delete() should not work on packages which are in repos
Summary: PackageAPI.delete() should not work on packages which are in repos
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: Sprint 21
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 563609 verified-to-close
TreeView+ depends on / blocked
 
Reported: 2011-02-25 12:27 UTC by Daniel Mach
Modified: 2011-08-16 12:21 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:07:52 UTC
Embargoed:


Attachments (Terms of Use)

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.


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