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:
parent
4468ba9a8d
commit
3fae32219e
|
@ -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"
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue