debian/lib/python/debian_linux/debian.py,

debian/lib/python/debian_linux/gencontrol.py:
Make it possible to add more than one paragraph as substitution.

svn path=/dists/trunk/linux-2.6/; revision=7060
This commit is contained in:
Bastian Blank 2006-07-20 00:47:41 +00:00
parent 4468ba9a8d
commit 3fae32219e
2 changed files with 9 additions and 4 deletions

View File

@ -85,12 +85,12 @@ class package_description(object):
__slots__ = "short", "long"
def __init__(self, value = None):
self.long = []
if value is not None:
self.short, long = value.split ("\n", 1)
self.long = long.split ("\n.\n")
self.short, long = value.split("\n", 1)
self.append(long)
else:
self.short = None
self.long = []
def __str__(self):
ret = self.short + '\n'
@ -100,6 +100,11 @@ class package_description(object):
pars.append('\n '.join(w.wrap(i)))
return self.short + '\n ' + '\n .\n '.join(pars)
def append(self, str):
str = str.strip()
if str:
self.long.extend(str.split("\n.\n"))
class package_relation(object):
__slots__ = "name", "version", "arches"

View File

@ -213,7 +213,7 @@ class gencontrol(object):
desc = in_desc.__class__()
desc.short = self.substitute(in_desc.short, vars)
for i in in_desc.long:
desc.long.append(self.substitute(i, vars))
desc.append(self.substitute(i, vars))
e['Description'] = desc
def process_package(self, in_entry, vars):