Hide Forgot
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 ~]#
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 ~]#