As a user, I would like incremental export to be the same format as full export
Currently, incremental export of a yum repo creates a series of RPM files plus JSON files. This requires users to upload the new units instead of using the existing sync functionality.
As a user, I would prefer if incremental export just created a "regular" yum repo with the updated files. This would allow me to rely on plain old sync (with config override to keep old files) to import updates instead of having a different workflow for incrementals.
NOTE: I already have code to treat incremental differently for the time being, so please let myself or someone else on Katello team know when this changes :)
Allow for new
incremental_export_repomd exporter distributor config option (#854)
Previously, incremental exports were in a custom format where each erratum and RPM were written to disk, along with a set of JSON files with unit metadata. This required special handling of incremental imports that was significantly different a "regular" repo sync.
This patch adds a new
incremental_export_repomd distributor option. When this
is set, the incremental repo export generates metadata so that the on-disk
files can be synced via the typical yum sync process. Note that you would not
want to remove old units when doing this, since it would remove any units not
in the incremental :koala:.
This patch also disables the repomd revision optimization if the feed URL is overriden, which allows the following sequence to work:
- sync from upstream URL at midnight
- upstream repo gets updated at 1am
- sync an incremental at 2am
- sync from upstream URL at 3am
Without disabling the optimization, the last sync wouldn't pick up the changes. Disabling the optimization on feed URL overriding also allows recovery in this sequence:
- sync from upstream URL
- sync incremental with
When the optimization is disabled via feed overide, you can simply re-sync from the upstream URL to fix this :cat2:.