Bug #35740
closedComposite content view versions can be emptied out during same-repo merging
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2141810
Description of problem:
When working with ccv, cv, include and exclude filters, there are some situations where the total # of packages are not matching in the ccv at the end of the day.
Version-Release number of selected component (if applicable):
Any Katello with Pulp 3
How reproducible:
100%
Steps to Reproduce:
1) Create two component content views with the same repository in it
2) Add a filter to one of the repositories to clear out all content
3) Publish both content views
4) Create a composite content view with both component content views in it
5) Publish that content view
6) If there is any content in the composite content view version, add `source_repositories = source_repositories.reverse` here: https://github.com/Katello/katello/blob/master/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb#L21
7) The next publish of the composite version should result in no content being available in the component content view version
Actual results:
One or more repos in the composite content view version are missing all content.
Expected results:
The total # of packages should be the sum of all the content views, packages and modules (minus packages with the same name in the same base repository)