pulp/pulp_rpm — pull request #611 by beav (2014-12-15 21:23:58+00:00)
Title: 1171280 - ensure packages are available when calculating applicability

Previously, errata calculation only checked the consumer's installed packages
against the packages listed in the erratum to determine if the erratum was
applicable.

For example, if package "foo 1.1" was in an erratum's package list and the
consumer had "foo 1.0" installed, the erratum would show as outstanding even if
"foo 1.1" was not available. This is exacerbated when an erratum lists packages
for multiple distributions like RHEL6 and RHEL7; a RHEL6 consumer may see
packages that need to be applied that they do not have access to.

This patch alters the applicability calculation behavior. The list of
applicable packages in the erratum are filtered against the NEVRAs of packages
in the repo before applicability calculations are made.

A migration has been added to drop the `repo_profile_applicability` collection.
This contains incorrect data; dropping it will ensure that applicability is
re-calculated and cached again upon request.