[OE-core] [PATCH 2/3] package_ipk.bbclass: make DESCRIPTION support newline

Martin Jansa martin.jansa at gmail.com
Wed Jun 19 09:29:52 UTC 2013


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 <liezhi.yang at windriver.com>
> ---
>  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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130619/209b0296/attachment-0002.sig>


More information about the Openembedded-core mailing list