[Pulp-list] erratum.pkglist requirements for empty modules

Tatiana Tereshchenko ttereshc at redhat.com
Thu Mar 21 09:19:33 UTC 2019


Hi Rohan,

On Thu, Mar 21, 2019 at 7:20 AM Rohan McGovern <rmcgover at redhat.com> wrote:

> Hi team,
>
> I'm seeking clarification of the required format of "pkglist" when
> using the Pulp API to upload erratum units in latest 2-master.
>
> Is the format of pkglist documented anywhere?  If so, could somebody
> please point me at that?
>

Managing of modular errata was added according to this story
https://pulp.plan.io/issues/3919.
There is an example of JSON for uploading errata. Let me know if you have
questions about the format.


>
> If there's no docs which would explain this, then can you please clarify
> the behavior for the following scenario:
>
> I have an erratum which contains a module, and that module contains no
> RPMs. I put the erratum and modulemd units into a repo.
>
> (1) When I publish that repo with yum_distributor, is the erratum
> expected to show up in updateinfo.xml?  i.e. does it make sense in
> general for an update with no RPMs (but with a module) to be rendered in
> updateinfo.xml; can dnf or other tools make use of it?
>

Yes, an erratum with module info but no RPMs is published and should be
present in a repo.
There are couple cases when it can happen:
 - only module metadata is updated
 - new module is introduced and it currently doesn't have any RPMs in it
but it depends on the other module in the other repo.



> (2) If answer to (1) is Yes and the update should be rendered: do I need
> to put anything in pkglist to make this happen?
>

Yes, since module information in an erratum is present per collection, I
think you need a pkglist with a collection which contains module info and
empty 'packages' list.

{ ...
  "pkglist": [{
                   "name": "coll_name1",
                   "module": {
                                 "name": "duck",
                                 "stream": "0",
                                 "version": "20180730233102",
                                 "context": "deadbeef",
                                 "arch": "noarch"
                             },
                    "packages": []
  }]



>
> >From reading the code, I think the requirement may be that the uploaded
> pkglist contains an (empty) collection for each module, regardless of
> whether the module has packages.  Would be good to have that confirmed.
>

Yes, one collection per module, each of them containing module info and
empty 'packages' list as described above.


>
> I don't think this behavior is entirely consistent either; e.g. earlier
> in _get_pkglist_to_publish, it bails out entirely if the repo contains
> no RPMs.  But how does that make sense if erratum with modules (but no
> RPMs) are supposed to be rendered?  Why should a module-only erratum be
> rendered if in a repo with RPMs, but not rendered if in a repo with no
> RPMs?
>

That's a good question.
The case when module-only erratum is present is expected to be relatively
rare, so it's hard to imagine a use case for a repo with no RPMs which
consists of modules only and those modules update their metadata only.
If you think such use case should be supported and will help your
workflows, feel free to file a bug and it should be relatively easy to fix
and just ignore the fact that there are no RPMs in a repo.

Let me know if anything is unclear or if you have any other questions,
Tanya


>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20190321/92279a5b/attachment.htm>


More information about the Pulp-list mailing list