<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Rohan,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019 at 7:20 AM Rohan McGovern <<a href="mailto:rmcgover@redhat.com">rmcgover@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi team,<br>
<br>
I'm seeking clarification of the required format of "pkglist" when<br>
using the Pulp API to upload erratum units in latest 2-master.<br>
<br>
Is the format of pkglist documented anywhere?  If so, could somebody<br>
please point me at that?<br></blockquote><div><br></div><div>Managing of modular errata was added according to this story <a href="https://pulp.plan.io/issues/3919">https://pulp.plan.io/issues/3919</a>.</div><div>There is an example of JSON for uploading errata. Let me know if you have questions about the format.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
If there's no docs which would explain this, then can you please clarify<br>
the behavior for the following scenario:<br>
<br>
I have an erratum which contains a module, and that module contains no<br>
RPMs. I put the erratum and modulemd units into a repo.<br>
<br>
(1) When I publish that repo with yum_distributor, is the erratum<br>
expected to show up in updateinfo.xml?  i.e. does it make sense in<br>
general for an update with no RPMs (but with a module) to be rendered in<br>
updateinfo.xml; can dnf or other tools make use of it?<br></blockquote><div> </div><div>Yes, an erratum with module info but no RPMs is published and should be present in a repo. <br></div><div>There are couple cases when it can happen:</div><div> - only module metadata is updated</div><div> - 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.<br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(2) If answer to (1) is Yes and the update should be rendered: do I need<br>
to put anything in pkglist to make this happen?<br></blockquote><div> </div><div>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.</div><div></div><div><pre>{ ...   <br>  "pkglist": [{
                   "name": "coll_name1",
                   "module": {
                                 "name": "duck",
                                 "stream": "0",
                                 "version": "20180730233102",
                                 "context": "deadbeef",
                                 "arch": "noarch" 
                             },
                    "packages": []<br>  }]<br></pre></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>From reading the code, I think the requirement may be that the uploaded<br>
pkglist contains an (empty) collection for each module, regardless of<br>
whether the module has packages.  Would be good to have that confirmed.<br></blockquote><div><br></div><div>Yes, one collection per module, each of them containing module info and empty 'packages' list as described above.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I don't think this behavior is entirely consistent either; e.g. earlier<br>
in _get_pkglist_to_publish, it bails out entirely if the repo contains<br>
no RPMs.  But how does that make sense if erratum with modules (but no<br>
RPMs) are supposed to be rendered?  Why should a module-only erratum be<br>
rendered if in a repo with RPMs, but not rendered if in a repo with no<br>
RPMs?<br></blockquote><div><br></div><div>That's a good question.</div><div>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.</div><div>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.<br></div><div></div><div><br></div><div>Let me know if anything is unclear or if you have any other questions,</div><div>Tanya<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com" target="_blank">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a><br>
</blockquote></div></div></div>