Description of problem: User gets db error when trying to delete content providers Version-Release number of selected component (if applicable): How reproducible: Every time, I think Steps to Reproduce: 1. Create an RHN Content provider 2. Import a channel repo. 3. Delete Channel Repo 4. Attempt to delete Content Provider Actual results: Failed to delete content providers. Cause: javax.ejb.EJBException:javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not execute update query -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: could not execute update query -> org.hibernate.exception.ConstraintViolationException:could not execute update query -> org.postgresql.util.PSQLException:ERROR: update or delete on table "rhq_package_version" violates foreign key constraint "rhq_advisory_package_package_version_id_fkey" on table "rhq_advisory_package" Detail: Key (id)=(10004) is still referenced from table "rhq_advisory_package".[SQLException=ERROR: update or delete on table "rhq_package_version" violates foreign key constraint "rhq_advisory_package_package_version_id_fkey" on table "rhq_advisory_package" Detail: Key (id)=(10004) is still referenced from table "rhq_advisory_package".] Expected results: CP can be deleted. Additional info:
Commit dbc2429e2a4c6eb03109ded64d30a104490c4623 Advisory.java AdvisoryPackage.java ContentSourceManagerBean.java ContentSourceRepoFlowTest.java Need to make sure we delete orphaned advisories when deleting orphaned packages.
QA Verified.
Mass-closure of verified bugs against JON.