specfile: Make package descriptions mandatory again

This commit is contained in:
Fatih Aşıcı
2010-09-21 13:39:30 +00:00
parent 34db2b1918
commit f212487d34
2 changed files with 1 additions and 12 deletions
-5
View File
@@ -1052,11 +1052,6 @@ class Builder:
if not package.summary:
package.summary = self.spec.source.summary
if not package.description:
# TODO: remove this if statement with the part in
# specfile.py:SpecFile
if not self.spec.source.description:
self.spec.dirtyWorkAround()
package.description = self.spec.source.description
if not package.partOf:
package.partOf = self.spec.source.partOf
+1 -7
View File
@@ -174,7 +174,7 @@ class Source:
t_IsA = [ [autoxml.String], autoxml.optional]
t_PartOf = [autoxml.String, autoxml.optional]
t_Summary = [autoxml.LocalText, autoxml.mandatory]
t_Description = [autoxml.LocalText, autoxml.optional]
t_Description = [autoxml.LocalText, autoxml.mandatory]
t_Icon = [ autoxml.String, autoxml.optional]
t_Archive = [ [Archive], autoxml.mandatory, "Archive" ]
t_AdditionalFiles = [ [AdditionalFile], autoxml.optional]
@@ -398,12 +398,6 @@ class SpecFile(xmlfile.XmlFile):
def getSourceRelease(self):
return self.history[0].release
def dirtyWorkAround(self):
#TODO: Description should be mandatory. Remove this code when repo is ready.
#http://liste.pardus.org.tr/gelistirici/2006-September/002332.html
self.source.description = autoxml.LocalText("Description")
self.source.description["en"] = self.source.summary["en"]
def _set_i18n(self, tag, inst):
try:
for summary in tag.tags("Summary"):