[yum-commits] Branch 'yum-3_2_X' - yum/packages.py

skvidal at osuosl.org skvidal at osuosl.org
Thu Feb 3 13:29:23 UTC 2011


 yum/packages.py |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit a4e20ff3400f80e3693949c8b0357fbe21a3c3ff
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Thu Feb 3 00:54:36 2011 -0500

    make sure we write out the sourcerpm tag even if it is empty b/c
    yum 2.4.X and OLD y-m-p freak out otherwise
    createrepo ticket # 12

diff --git a/yum/packages.py b/yum/packages.py
index 6f61fea..15eeeaa 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -1069,6 +1069,9 @@ class YumAvailablePackage(PackageObject, RpmBase):
             
         if self.sourcerpm:
             msg += """    <rpm:sourcerpm>%s</rpm:sourcerpm>\n""" % misc.to_xml(self.sourcerpm)
+        else: # b/c yum 2.4.3 and OLD y-m-p willgfreak out if it is not there.
+            msg += """    <rpm:sourcerpm/>\n"""
+        
         msg +="""    <rpm:header-range start="%s" end="%s"/>""" % (self.hdrstart,
                                                                self.hdrend)
         msg += self._dump_pco('provides')


More information about the Yum-commits mailing list