Bug 791334 - Deleting repo does not remove its association with a package if its added using the add_package option
Summary: Deleting repo does not remove its association with a package if its added us...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 34
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-16 19:18 UTC by Preethi Thomas
Modified: 2013-09-09 16:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-19 13:55:04 UTC


Attachments (Terms of Use)

Description Preethi Thomas 2012-02-16 19:18:17 UTC
Description of problem:

If you add a package with add_package option to a repo, and then you delete the repo, and create a repo with a repo with same name, the package added previously still showed as the part of the repo.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a repo with name say "test-repo"
2. Associate a package to the repo with add_package option
3. Delete the repo "test-repo"
4. Now create a repo with the same name  "test-repo"
5. Try to add the same package from step 2 to the repo
6. Run repo content

  
Actual results:
Package  are already part of repo [test]. skipping


Expected results:


Additional info:

[root@katello-test ~]# pulp-admin -u admin -p admin  repo add_package -p emoticons --id=test
Package emoticons could not be found skipping
[root@katello-test ~]# pulp-admin -u admin -p admin  repo add_package -p emoticons-0.1-2.noarch.rpm --id=test
No Source repo specified, skipping dependency lookup
Successfully associated 1 packages to repo [test]
Packages skipped because of filters associated to the repository : 0
Please run `pulp-admin repo generate_metadata` to update the repository metadata.

[root@katello-test ~]# 
[root@katello-test ~]# pulp-admin -u admin -p admin  repo content --id=test
+------------------------------------------+
              Contents of test
+------------------------------------------+

Packages in test: 

pulp-common-0.0.254-8.noarch.rpm
pulp-client-lib-0.0.254-8.noarch.rpm
emoticons-0.1-2.noarch.rpm

Errata in test: 

 none


[root@katello-test ~]# pulp-admin -u admin -p admin  repo delete --id=test
Repository [ test ] being deleted

[root@katello-test ~]# pulp-admin -u admin -p admin  repo create --id=test
Successfully created repository [ test ]

[root@katello-test ~]# 
[root@katello-test ~]# 
[root@katello-test ~]# pulp-admin -u admin -p admin  content upload --dir upload/ -r test -v --nosig
* Starting Content Upload

* Performing Content Uploads to Pulp server
Successfully uploaded [pulp-common-0.0.254-8.noarch.rpm] to server
Successfully uploaded [pulp-client-lib-0.0.254-8.noarch.rpm] to server

* Performing Repo Associations 
Packages skipped because of filters associated with the repository test : 0

* Metadata generation has been scheduled for repository [test] with a task id [e58e81c5-58d0-11e1-a2be-54520065b6c1]; use `pulp-admin repo generate_metadata --status` to check the status.

Content association Complete for Repo [test]: 
 Packages: 
pulp-common-0.0.254-8.noarch.rpm
pulp-client-lib-0.0.254-8.noarch.rpm 
 
 Files: 
None

* Content Upload complete.
[root@katello-test ~]# pulp-admin -u admin -p admin  content upload --dir file/ -r test -v --nosig
* Starting Content Upload

* Performing Content Uploads to Pulp server
Successfully uploaded [test2.txt] to server
Successfully uploaded [test1.txt] to server

* Performing Repo Associations 

Content association Complete for Repo [test]: 
 Packages: 
None 
 
 Files: 
test1.txt
test2.txt

* Content Upload complete.
[root@katello-test ~]# pulp-admin -u admin -p admin  repo content --id=test+------------------------------------------+
              Contents of test
+------------------------------------------+

Packages in test: 

pulp-client-lib-0.0.254-8.noarch.rpm
pulp-common-0.0.254-8.noarch.rpm

Errata in test: 

 none

Files in test: 

 test1.txt
 test2.txt

[root@katello-test ~]# pulp-admin -u admin -p admin  repo add_package -p emoticons-0.1-2.noarch.rpm --id=test
Package [emoticons-0.1-2.noarch.rpm] are already part of repo [test]. skipping
[root@katello-test ~]# pulp-admin -u admin -p admin  repo content --id=test+------------------------------------------+
              Contents of test
+------------------------------------------+

Packages in test: 

pulp-client-lib-0.0.254-8.noarch.rpm
pulp-common-0.0.254-8.noarch.rpm

Errata in test: 

 none

Files in test: 

 test1.txt
 test2.txt

[root@katello-test ~]# pulp-admin -u admin -p admin  repo remove_package -p emoticons-0.1-2.noarch.rpm --id=test
No dependencies to process..
Successfully removed package [u'emoticons-0.1-2.noarch.rpm'] from repo [test]. Please run `pulp-admin repo generate_metadata` to update the repository metadata.

[root@katello-test ~]# 
[root@katello-test ~]# 
[root@katello-test ~]# pulp-admin -u admin -p admin  repo add_package -p emoticons-0.1-2.noarch.rpm --id=test
Package [emoticons-0.1-2.noarch.rpm] are already part of repo [test]. skipping
[root@katello-test ~]# 
[root@katello-test ~]#

Comment 2 Preethi Thomas 2012-04-19 13:55:04 UTC
Looks like this is not a bug. Retested
[root@pulp-v1-1-server ~]# rpm -q pulp
pulp-1.1.2-1.fc16.noarch

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo   add_package  --id=testrepo -p katello-cli-common-0.2.18-1.fc16.noarch.rpm
No Source repo specified, skipping dependency lookup
Successfully associated 1 packages to repo [testrepo]
Packages skipped because of filters associated to the repository : 0
Please run `pulp-admin repo generate_metadata` to update the repository metadata.

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo content --id testrepo
+------------------------------------------+
            Contents of testrepo
+------------------------------------------+

Packages in testrepo: 

katello-cli-common-0.2.18-1.fc16.noarch.rpm

Errata in testrepo: 

 none

Files in testrepo: 

 none

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo delete --id testrepo
Repository [ testrepo ] being deleted

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo content --id testrepo
error:  operation failed: No repository testrepo
[root@pulp-v1-1-server ~]#  pulp-admin -u admin -p admin repo create --id=testrepo
Successfully created repository [ testrepo ]

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo content --id testrepo
+------------------------------------------+
            Contents of testrepo
+------------------------------------------+

Packages in testrepo: 

 none

Errata in testrepo: 

 none

Files in testrepo: 

 none

[root@pulp-v1-1-server ~]# pulp-admin -u admin -p admin repo   add_package  --id=testrepo -p katello-cli-common-0.2.18-1.fc16.noarch.rpm
No Source repo specified, skipping dependency lookup
Successfully associated 1 packages to repo [testrepo]
Packages skipped because of filters associated to the repository : 0
Please run `pulp-admin repo generate_metadata` to update the repository metadata.

[root@pulp-v1-1-server ~]#


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