pulp group exporter does not honor relative_url
As a user, I would like to use Pulp's existing ISO creation functionality to export ISOs containing multiple repos. However, currently there is no way to set the relative_url (aka relative path) on the exported repos if they are exported as a group.
Here is a use case:
- create yum repos Foo and Bar, both with relative_url fields set on the export distributor (see https://pulp.plan.io/issues/1394).
- create a repo group with Foo and Bar
- export said repo group as either an ISO or to a directory
expected result: exported repos will be exported with the tree set via relative_url
actual result: all of the repos are exported "flat", with the repo ID as the directory name
The repo's relative path is the basis for content protection, and is also used by Katello when reading a manifest to perform repo discovery.
It might be possible to just export each repo on its own, and rely on https://pulp.plan.io/issues/1394 to get the correct tree. However, I do not know of a way to export multiple repos to the same ISO without creating a repo group. Pulp already does a lot of the hard work with ISO creation and listing file creation and I would like to rely on it as much as possible:)
I was able to patch this by updating https://github.com/pulp/pulp_rpm/blob/master/plugins/pulp_rpm/plugins/distributors/yum/publish.py#L196-L209. Basically, I attempted to grab the export distributor for each repo in the loop and if it exists and has 'relative_url' set, add that to repo_config_copy that when calling ExportRepoPublisher. I think the repo_config obtained is the config for the group, not a particular repo.