On Wed, Jun 19, 2013 at 05:00:40AM -0400, Robert Yang wrote: > The recipe's DESCRIPTION is wrapped automatically by textwrap, make it > support newline ("\n") to let the user can wrap it manually, e.g.: > > DESCRIPTION = "Foo1\nFoo2" > > In the past, it would be: > Foo1\nFoo2 > > Now: > Foo1 > Foo2 > > [YOCTO #4348] > > Signed-off-by: Robert Yang > --- > meta/classes/package_ipk.bbclass | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass > index 55628e4..e67f641 100644 > --- a/meta/classes/package_ipk.bbclass > +++ b/meta/classes/package_ipk.bbclass > @@ -304,10 +304,11 @@ python do_package_ipk () { > # Special behavior for description... > if 'DESCRIPTION' in fs: > summary = localdata.getVar('SUMMARY', True) or localdata.getVar('DESCRIPTION', True) or "." > + ctrlfile.write('Description: %s\n' % summary) > description = localdata.getVar('DESCRIPTION', True) or "." > description = textwrap.dedent(description).strip() > - ctrlfile.write('Description: %s\n' % summary) > - ctrlfile.write('%s\n' % textwrap.fill(description, width=74, initial_indent=' ', subsequent_indent=' ')) > + for t in description.split('\\n'): > + ctrlfile.write('%s\n' % textwrap.fill(t, width=74, initial_indent=' ', subsequent_indent=' ')) > else: Isn't DESCRIPTION supposed to be short oneline and longer multiline only in SUMMARY? is opkg-utils (package-index) working with this? Newlines in SUMMARY were causing incorrect parsing and not using cache IIRC, not sure if the fix for that was generic enough to cover DESCRIPTION.