Issue #4138
closedHandling publish paths correctly
Description
Most Debian repositories use one of the following paths to the Release file:
<base_path>/dists/<codename>/Release
<base_path>/dists/<suite>/Release
The current Pulp 2 behaviour is to always publish using <codename>.
However, this is not actually how these paths are specified by Debian.
(See https://wiki.debian.org/DebianRepository/Format)
The specification uses:
<base_path>/dists/<distribution>/Release
Where <distribution> may contain an arbitrary number of folder levels and may be different to both <codename> and <suite>. (A prominent example is the debian-security repository which uses <distribution> = "<codename>/updates" or <distribution> = "<suite>/updates").
Not using the same publish paths as the upstream repositories we are syncing (this is the case whenever <distribution> != <codename> for the upstream repo) leads to a host of problems.
One example is: https://pulp.plan.io/issues/3464
Currently the <distribution> is only known to the original repo_importer.
Since publishers should be independent of the repo_importer, the only clean way I can think of to solve this and all related bugs is to add a distribution field to the units_deb_release collection and then use it accordingly.
Related issues
Add an optional pre index part for DB migrations
This is needed to provide a way to prepare the data base for an index change BEFORE that index is applied. The new mechanism is subject to certain risks and limitations. It should only be used where absolutely necessary.
ref #4055, #4138 https://pulp.plan.io/issues/4055 https://pulp.plan.io/issues/4138
closes #4871 https://pulp.plan.io/issues/4871