Bug #33358
closedRPM include filter includes extraneous packages from package groups having only type="default" packagereqs
Description
At time of writing, with http://mirror.centos.org/centos-7/7.9.2009/ these are mainframe-access, networkmanager-submodules, internet-browser, and platform-microsoft, and with https://download.fedoraproject.org/pub/epel/7/x86_64/, milkymist.
Create a Content View, add EPEL7, add an include filter for some RPMs, publish and expect to get just those RPMs, but end up with the packages in @milkymist also.
What I believe to be happening: Katello includes package groups for which it determines the requirements are satisfied by the packages selected (filter_package_groups_by_pulp_href in app/lib/katello/util/pulpcore_content_filters.rb). The method which lists the requirements (package_names in app/models/katello/package_group.rb) produces it by combining the results of {default,optional,conditional,mandatory}_package_names in app/services/katello/pulp3/package_group.rb, whose mapping of the numeric identifiers is off by one because C numbers enums from 0. So package_names does not include type="default" packagereqs, and when a package group contains only type="default" packagereqs, package_names returns empty, is trivially satisfied, and the package group is included in the list of content to be copied by Pulp. Pulp, however, then recognizes that there are unsatisfied packagereqs and includes them.
Patch forthcoming.