Hello, Any feedback on this change? This is a bugfix for mergerepo going to knees on openSUSE updateinfos.
Libor On Wed 15-10-14 15:56:22, Libor Pechacek wrote: > Attribute `short' and element `name' are optional in collections. Take that > into account when generating XML. > > Signed-off-by: Libor Pechacek <lpecha...@suse.cz> > --- > yum/update_md.py | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/yum/update_md.py b/yum/update_md.py > index 7dcfce550990..19ed43718870 100644 > --- a/yum/update_md.py > +++ b/yum/update_md.py > @@ -380,9 +380,12 @@ class UpdateNotice(object): > if self._md['pkglist']: > msg += """ <pkglist>\n""" > for coll in self._md['pkglist']: > - msg += """ <collection short="%s">\n > <name>%s</name>\n""" % ( > - to_xml(coll['short'], attrib=True), > - to_xml(coll['name'])) > + msg += """ <collection""" > + if 'short' in coll: > + msg += """ short="%s\"""" % (to_xml(coll['short'], > attrib=True)) > + msg += """>\n""" > + if 'name' in coll: > + msg += """ <name>%s</name>\n""" % > (to_xml(coll['name'])) > > for pkg in coll['packages']: > msg += """ <package arch="%s" name="%s" > release="%s" src="%s" version="%s" epoch="%s"> > -- > 1.7.12.4 -- Libor Pechacek SUSE Labs _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel