1 |
El mar, 29-01-2013 a las 14:03 +0800, Ben de Groot escribió: |
2 |
> On 29 January 2013 03:30, Pacho Ramos <pacho@g.o> wrote: |
3 |
> > El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribió: |
4 |
> >> I've started using this eclass, but with README files, not the variable, |
5 |
> >> because this is currently the only way I can make sure it honours my |
6 |
> >> formatting. |
7 |
> >> |
8 |
> > |
9 |
> > Couldn't it be covered if "echo -e" was used (even with fmt) and you, |
10 |
> > then, control formatting with some of the sequences it allows (they are |
11 |
> > shown in its man page)? |
12 |
> |
13 |
> No. The eclass should assume that DOC_CONTENTS is already correctly |
14 |
> formatted. If you must, you can add a convenience function for people |
15 |
> who do want reformatting, but this should NOT be the default. Please |
16 |
> don't make this eclass harder to use than it needs to be. |
17 |
> |
18 |
|
19 |
I can add a variable (and probably will), but would prefer to keep it |
20 |
formatting messages by default, otherwise, how will you set DOC_CONTENTS |
21 |
variable inside a pkg phase (instead of global scope) without adding |
22 |
tabs to it? You can of course add it, but it will be read as something |
23 |
like: |
24 |
src_prepare() { |
25 |
DOC_CONTENTS="blablabla |
26 |
blablabla" |
27 |
# Rest of src_prepare stuff |
28 |
} |
29 |
|
30 |
Also, autoformatting will help to prevent every package setting messages |
31 |
with different lines length (in some cases really long lines that I |
32 |
finally reported some bugs in the past to get them fitting in "standard" |
33 |
80 characters per line). |
34 |
|
35 |
I would then switch to "echo -e" and also add a function (like my |
36 |
original solution in this thread) to allow you to disable formatting if |
37 |
you want |