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
}

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). 

I would then switch to "echo -e" and also add a function (like my
original solution in this thread) to allow you to disable formatting if
you want

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to