pisi/component.py(Maintainer): Add Maintainer tag to components.xml.

This commit is contained in:
Ozan Çağlayan
2010-02-02 07:57:33 +00:00
parent 8e904f923f
commit acd139a10d
2 changed files with 21 additions and 4 deletions
+3
View File
@@ -1,3 +1,6 @@
2010-02-02 Ozan Çağlayan <ozan@pardus.org.tr>
* pisi/component.py(Maintainer): Add Maintainer tag to components.xml.
2010-01-26 Serdar Dalgıç <serdar@pardus.org.tr>
* Handle urllib2 errors of dummy .part files created as a result of unreachable
translations.xml's. Fixes #12136.
+18 -4
View File
@@ -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.