El mié, 30-01-2013 a las 21:24 +0800, Ben de Groot escribió:
> On 30 January 2013 05:47, Pacho Ramos <pa...@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 <pa...@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: signature.asc
Description: This is a digitally signed message part

Reply via email to