[Rpm-metadata] createrepo/yumbased.py
Seth Vidal
skvidal at linux.duke.edu
Tue Jan 15 18:32:40 UTC 2008
createrepo/yumbased.py | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 29e863fe96cb56e0c8da0ae2962cfcb817732977
Author: Seth Vidal <skvidal at fedoraproject.org>
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,
More information about the Rpm-metadata
mailing list