pulp/pulp — pull request #367 by pieska (2013-03-11 20:18:25+00:00)
Title: fix errata list processing for multiple installed packages

i think the algorihm to determine which errata are applicable is not correct in PULP V1 and possibly in V2.

Example:

# yum list installed kernel
Installed Packages
kernel.i686 2.6.32-279.22.1.el6
kernel.i686 2.6.32-358.0.1.el6

OK, two installed kernels. Installing multiple kernel versions is default.

$ pulp-consumer errata list
Id Type Title
RHSA-2013:0496 security Important: Red Hat Enterprise Linux 6 kernel update

RHSA-2013:0496, a kernel update, is listed as applicable.

Id RHSA-2013:0496
Title Important: Red Hat Enterprise Linux 6 kernel update
Packages Effected kernel-2.6.32-358.el6.i686.rpm,

PULP V1 (1.1.15) reports the errata as applicable because the it checks against the older
2.6.32-279.22.1.el6 and ignores the newer 2.6.32-358.0.1.el6.

i changed the algorithm, see attached patch, so, that errata are only reported as applicable if ALL installed packages older than the errata package. the example given above now reports no errata, which is correct IMHO. i also changed compare_packages to include the comparison of name and arch.