summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-rw-r--r--meta/classes/package_deb.bbclass14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 949432e32d..663f6461c8 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -279,10 +279,20 @@ python do_package_deb () {
279 # Special behavior for description... 279 # Special behavior for description...
280 if 'DESCRIPTION' in fs: 280 if 'DESCRIPTION' in fs:
281 summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "." 281 summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "."
282 ctrlfile.write('Description: %s\n' % unicode(summary))
282 description = localdata.getVar('DESCRIPTION', True) or "." 283 description = localdata.getVar('DESCRIPTION', True) or "."
283 description = textwrap.dedent(description).strip() 284 description = textwrap.dedent(description).strip()
284 ctrlfile.write('Description: %s\n' % unicode(summary)) 285 if '\\n' in description:
285 ctrlfile.write('%s\n' % unicode(textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' '))) 286 # Manually indent
287 for t in description.split('\\n'):
288 # We don't limit the width when manually indent, but we do
289 # need the textwrap.fill() to set the initial_indent and
290 # subsequent_indent, so set a large width
291 ctrlfile.write('%s\n' % unicode(textwrap.fill(t, width=100000, initial_indent=' ', subsequent_indent=' ')))
292 else:
293 # Auto indent
294 ctrlfile.write('%s\n' % unicode(textwrap.fill(description.strip(), width=74, initial_indent=' ', subsequent_indent=' ')))
295
286 else: 296 else:
287 ctrlfile.write(unicode(c % tuple(pullData(fs, localdata)))) 297 ctrlfile.write(unicode(c % tuple(pullData(fs, localdata))))
288 except KeyError: 298 except KeyError: