public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Pacho Ramos <pacho@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable=
Date: Wed, 30 Jan 2013 19:43:14 +0100	[thread overview]
Message-ID: <1359571394.26423.4.camel@belkin4> (raw)
In-Reply-To: <CAB9SyzRkW1w06pn0k_ZkLeYjP-7A=AnCnBTGDdnu+L7ZG3o6wA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]

El mié, 30-01-2013 a las 21:24 +0800, Ben de Groot escribió:
> On 30 January 2013 05:47, Pacho Ramos <pacho@gentoo.org> wrote:
> > El mar, 29-01-2013 a las 14:03 +0800, Ben de Groot escribió:
> >> On 29 January 2013 03:30, Pacho Ramos <pacho@gentoo.org> wrote:
> >> > El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribió:
> >> >> I've started using this eclass, but with README files, not the variable,
> >> >> because this is currently the only way I can make sure it honours my
> >> >> formatting.
> >> >>
> >> >
> >> > Couldn't it be covered if "echo -e" was used (even with fmt) and you,
> >> > then, control formatting with some of the sequences it allows (they are
> >> > shown in its man page)?
> >>
> >> No. The eclass should assume that DOC_CONTENTS is already correctly
> >> formatted. If you must, you can add a convenience function for people
> >> who do want reformatting, but this should NOT be the default. Please
> >> don't make this eclass harder to use than it needs to be.
> >>
> >
> > I can add a variable (and probably will), but would prefer to keep it
> > formatting messages by default, otherwise, how will you set DOC_CONTENTS
> > variable inside a pkg phase (instead of global scope) without adding
> > tabs to it? You can of course add it, but it will be read as something
> > like:
> > src_prepare() {
> >         DOC_CONTENTS="blablabla
> > blablabla"
> >         # Rest of src_prepare stuff
> > }
> 
> I still prefer the eclass not to mess with formatting by default. You
> can do what you want by
> 
> src_prepare() {
>     DOC_CONTENTS="blabla
>         indented content"
>     # other stuff
> }

But it will be recorded with indent in README.gentoo, what is not
desired.

> 
> src_install() {
>     default
>     readme.gentoo_reformat
> }
> 
> > Also, autoformatting will help to prevent every package setting messages
> > with different lines length (in some cases really long lines that I
> > finally reported some bugs in the past to get them fitting in "standard"
> > 80 characters per line).
> 
> Sometimes long lines are what is required. If not, then filing a bug
> is the friendly solution.
> 

In that case, you could set the variable to skip formatting as, the
preferred option is to keep them in standard length, and the exception
is to require longer lines (in that case they could be covered with the
variable) 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-01-30 18:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 14:00 [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable Pacho Ramos
2013-01-27 17:47 ` readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable= Pacho Ramos
2013-01-27 18:05   ` Mike Frysinger
2013-01-27 18:21     ` Pacho Ramos
2013-01-28  4:37       ` Mike Frysinger
2013-01-28  6:37         ` Ben de Groot
2013-01-28 19:30           ` Pacho Ramos
2013-01-29  2:28             ` Mike Frysinger
2013-01-29  6:03             ` Ben de Groot
2013-01-29 21:47               ` Pacho Ramos
2013-01-29 22:06                 ` Michał Górny
2013-01-30  8:27                 ` Ralph Sennhauser
2013-01-30 13:24                 ` Ben de Groot
2013-01-30 18:43                   ` Pacho Ramos [this message]
2013-01-31 18:59   ` Pacho Ramos
2013-02-01  9:55     ` Ben de Groot
2013-02-01 11:07       ` Michael Weber
2013-02-01 20:34       ` Pacho Ramos
2013-02-02 11:04         ` Pacho Ramos
2013-01-31 15:22 ` [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable Dan Douglas
2013-01-31 20:43   ` [gentoo-dev] " Duncan

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=1359571394.26423.4.camel@belkin4 \
    --to=pacho@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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