Project

Profile

Help

Story #1398

closed

pulp group exporter does not honor relative_url

Added by cduryee over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.8.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Quarter:

Description

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.


Related issues

Blocked by RPM Support - Issue #1519: repo group export exports only last repo into the ISO ignoring previous onesCLOSED - WORKSFORMEpcreechActions
Blocked by RPM Support - Story #1520: make relative_url as supported optional key in repo export distributor creationCLOSED - CURRENTRELEASEipanova@redhat.com

Actions

Also available in: Atom PDF