From acd139a10d94451fb4f662c3146b7ea94b95ff88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ozan=20=C3=87a=C4=9Flayan?= Date: Tue, 2 Feb 2010 07:57:33 +0000 Subject: [PATCH] pisi/component.py(Maintainer): Add Maintainer tag to components.xml. --- ChangeLog | 3 +++ pisi/component.py | 22 ++++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1f9a2647..f2b20813 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-02-02 Ozan Çağlayan + * pisi/component.py(Maintainer): Add Maintainer tag to components.xml. + 2010-01-26 Serdar Dalgıç * Handle urllib2 errors of dummy .part files created as a result of unreachable translations.xml's. Fixes #12136. diff --git a/pisi/component.py b/pisi/component.py index 78aff637..b5fb8676 100644 --- a/pisi/component.py +++ b/pisi/component.py @@ -19,10 +19,9 @@ import pisi.context as ctx import pisi.pxml.xmlfile as xmlfile import pisi.pxml.autoxml as autoxml -class Error(pisi.Error): - pass +class Error(object): -__metaclass__ = autoxml.autoxml + __metaclass__ = autoxml.autoxml class Obsolete: @@ -50,6 +49,18 @@ class Distribution(xmlfile.XmlFile): t_Obsoletes = [ [Obsolete], autoxml.optional, "Obsoletes/Package"] +class Maintainer(xmlfile.XmlFile): + "representation for component responsibles" + + __metaclass__ = autoxml.autoxml + + t_Name = [autoxml.Text, autoxml.mandatory] + t_Email = [autoxml.String, autoxml.mandatory] + + def __str__(self): + s = "%s <%s>" % (self.name, self.email) + return s + class Component(xmlfile.XmlFile): "representation for component declarations" @@ -66,7 +77,10 @@ class Component(xmlfile.XmlFile): # Information about the component t_Summary = [autoxml.LocalText, autoxml.optional] t_Description = [autoxml.LocalText, autoxml.optional] - t_Group = [ autoxml.String, autoxml.optional ] + t_Group = [autoxml.String, autoxml.optional] + + # Component responsible + t_Maintainer = [Maintainer, autoxml.optional] # the parts of this component. # to be filled by the component database, thus it is optional.