[Pulp-list] Uploading the same RPM to multiple pulp repos via the REST API

Mihai Ibanescu mihai.ibanescu at gmail.com
Wed Nov 11 22:08:47 UTC 2015


Thanks for the reply! Also, thanks for still being able to parse my
contorted phrase that you quoted, I have no idea how I managed to write
that.

I've changed my code to do a unit lookup by checksum first (arguably I
should have done that anyway), and do a copy if it did find the unit.

The only wrinkles:

* if I find an orphan (a unit for which repository_memberships is empty), I
can't figure out how I can copy that into a repo. The association code
seems to expect a source repo. I suspect I need to re-upload in that case.
* if I attempt to push a new unit into two repos, I can push it to the
first one, but I could not figure out a way to retrieve the underlying unit
from the original upload's task. There are some IDs that do not correlate
to anything I can use. So I need to do an unnecessary lookup to find out
what I've just pushed, which is a real shame. I guess I could do the
copying by checksum again, to avoid an extra lookup.

Thank you again!
Mihai

On Wed, Nov 11, 2015 at 3:27 PM, Randy Barlow <rbarlow at redhat.com> wrote:

> On Wed, Nov 11, 2015 at 10:35:11AM -0500, Mihai Ibanescu wrote:
> > While I understand I could *copy* content between the two
> > repos, but it wasn't immediately obvious either.
>
> Hello Mihai!
>
> The shortcomings of the upload API are known by the Pulp developers, and
> we apologize for the trouble you've experienced. For now, the best thing
> for your workflow is what I've quoted from you above: upload the package
> to one repo, and then copy the packages from there to the others you
> wish it to be in.
>
> We do hope to rework the upload API at some time in the future, but I
> don't know when that will be. Apologies for your frustration in the
> meantime!
>
> --
> Randy Barlow
> irc:   bowlofeggs
> phone: +1-919-890-8150
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20151111/546c5d6b/attachment.htm>


More information about the Pulp-list mailing list