Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/3] package_ipk.bbclass: make DESCRIPTION support newline
Date: Wed, 19 Jun 2013 10:49:20 +0100	[thread overview]
Message-ID: <1371635360.20823.167.camel@ted> (raw)
In-Reply-To: <20130619092952.GF14021@jama>

On Wed, 2013-06-19 at 11:29 +0200, Martin Jansa wrote:
> 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@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?

No, SUMMARY is meant to be the short oneline and DESCRIPTION is the
multiline one afaik...

Cheers,

Richard

> 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.
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core




  reply	other threads:[~2013-06-19  9:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-19  9:00 [PATCH 0/3] make DESCRIPTION support newline Robert Yang
2013-06-19  9:00 ` [PATCH 1/3] package_rpm.bbclass: " Robert Yang
2013-06-19  9:00 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang
2013-06-19  9:29   ` Martin Jansa
2013-06-19  9:49     ` Richard Purdie [this message]
2013-06-19 10:10     ` Phil Blundell
2013-06-19 10:33   ` Enrico Scholz
2013-06-28  3:21     ` Robert Yang
2013-06-19  9:00 ` [PATCH 3/3] package_deb.bbclass: " Robert Yang
2013-06-26  3:27 ` [PATCH 0/3] " Robert Yang
2013-06-26 16:05   ` Saul Wold
2013-06-28  2:04     ` Robert Yang
2013-06-28  6:50       ` Martin Jansa
2013-06-28  7:34         ` Robert Yang
  -- strict thread matches above, loose matches on Subject: below --
2013-07-08  3:17 [PATCH 0/3 V2] " Robert Yang
2013-07-08  3:17 ` [PATCH 2/3] package_ipk.bbclass: " Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371635360.20823.167.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=martin.jansa@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox