createrepo/yumbased.py

[email protected] (Seth Vidal)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/yumbased.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 29e863fe96cb56e0c8da0ae2962cfcb817732977
Author: Seth Vidal <[email protected]>
Date:   Tue Jan 15 13:29:40 2008 -0500

    make sure we have empty stubs for items in the rpm-format section, older versions of
    yum will go bonkers if not.

diff --git a/createrepo/yumbased.py b/createrepo/yumbased.py
index b1a638d..88fcb0c 100644
--- a/createrepo/yumbased.py
+++ b/createrepo/yumbased.py
@@ -172,12 +172,24 @@ class CreateRepoPackage(YumLocalPackage):
         msg = "  <format>\n"
         if self.license:
             msg += """    <rpm:license>%s</rpm:license>\n""" % self._xml(self.license)
+        else:
+            msg += """    <rpm:license/>"""
+            
         if self.vendor:
             msg += """    <rpm:vendor>%s</rpm:vendor>\n""" % self._xml(self.vendor)
+        else:
+            msg += """    <rpm:vendor/>"""
+            
         if self.group:
             msg += """    <rpm:group>%s</rpm:group>\n""" % self._xml(self.group)
+        else:
+            msg += """    <rpm:group/>"""
+            
         if self.buildhost:
             msg += """    <rpm:buildhost>%s</rpm:buildhost>\n""" % self._xml(self.buildhost)
+        else:
+            msg += """    <rpm:buildhost/>"""
+            
         if self.sourcerpm:
             msg += """    <rpm:sourcerpm>%s</rpm:sourcerpm>\n""" % self._xml(self.sourcerpm)
         msg +="""    <rpm:header-range start="%s" end="%s"/>""" % (self.hdrstart,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.