debian/lib/python/debian_linux/debian.py: Handle packages with only short descriptions
This commit is contained in:
parent
775cc1229e
commit
619cd907a8
|
@ -17,6 +17,8 @@ linux (4.7~rc7-1~exp1) UNRELEASED; urgency=medium
|
|||
- Warn and taint kernel if this feature is actually used
|
||||
* Define Auto-Built-Package field when running dpkg-gencontrol, as dpkg-source
|
||||
doesn't like to see it in debian/control
|
||||
* debian/lib/python/debian_linux/debian.py: Handle packages with only short
|
||||
descriptions
|
||||
|
||||
[ Bastian Blank ]
|
||||
* Mark debug symbols packages to move them into the debug archive.
|
||||
|
|
|
@ -216,9 +216,10 @@ class PackageDescription(object):
|
|||
self.short = []
|
||||
self.long = []
|
||||
if value is not None:
|
||||
short, long = value.split(u"\n", 1)
|
||||
self.append(long)
|
||||
self.append_short(short)
|
||||
desc_split = value.split("\n", 1)
|
||||
self.append_short(desc_split[0])
|
||||
if len(desc_split) == 2:
|
||||
self.append(desc_split[1])
|
||||
|
||||
def __str__(self):
|
||||
wrap = utils.TextWrapper(width=74, fix_sentence_endings=True).wrap
|
||||
|
@ -227,7 +228,7 @@ class PackageDescription(object):
|
|||
for i in self.long:
|
||||
long_pars.append(wrap(i))
|
||||
long = '\n .\n '.join(['\n '.join(i) for i in long_pars])
|
||||
return short + '\n ' + long
|
||||
return short + '\n ' + long if long else short
|
||||
|
||||
def append(self, str):
|
||||
str = str.strip()
|
||||
|
|
Loading…
Reference in New Issue