pulp/pulp_rpm — pull request #614 by beav (2014-12-19 16:14:52+00:00)
Title: 1171278 - update erratum when a new packagelist is encountered

**NOTE: this should not be merged until Pulp 2.4.4 is released**

Errata are typically published via updateinfo.xml in the feed repository.
However, an erratum may span across multiple repos. For example, the POODLE
erratum was for both RHEL6 and RHEL7.

Errata that span repos contain the same ID (and thus unit_key), but may have
different pkglist sets. Upstream reposotiries will typically prune the pkglist
to only contain packages in that repo. This causes issues when the same erratum
is in two or more repositories, each containing different package sets.

This patch adds a new `additive_type` flag to `save_fileless_units()`. If the
flag is enabled, `save_fileless_units()` will detect if an existing unit
exists, and will call `_concatenate_units()` to combine the existing unit with
the new unit. The behavior of `_concatenate_units()` is dependant on the unit
type; for errata, we simply combine pkglists based on the pkglist name field.

A migration is not needed after applying this patch but users will need to
resync their repositories to correct any existing partial errata packagelists.