[Yum-devel] [PATCH] 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

Seth Vidal skvidal at fedoraproject.org
Thu Feb 3 05:55:13 UTC 2011


---
 yum/packages.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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')
-- 
1.7.3.4



More information about the Yum-devel mailing list