1 |
On 21-10-2011 06:09:57 +0000, Zac Medico wrote: |
2 |
> UpdateChangeLog: split out/test copyright regex |
3 |
> |
4 |
> This also fixes a case where something like "Copyright 2011 " would be |
5 |
> replaced with "Copyright 2011-2011 ". |
6 |
|
7 |
I like this, but it should only happen when one would live in 1999 |
8 |
(that's why I added it unconditionally), see below. I'm affraid we need |
9 |
the 1999 to be configured, for legal reasons (though I don't claim to be |
10 |
an expert on this case, just judging from the comments from echangelog). |
11 |
|
12 |
> + def testCopyrightUpdate(self): |
13 |
> + test_cases = ( |
14 |
> + ( |
15 |
> + '2011', |
16 |
> + '# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2', |
17 |
> + '# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2', |
18 |
|
19 |
we should add a case like |
20 |
|
21 |
# Copyright 2010-2011 Gentoo Foundation; Distributed ... |
22 |
|
23 |
echangelog would have rewritten it to 1999-2011, because of legal |
24 |
reasons IIRC. |
25 |
|
26 |
> +def _update_copyright_year(year, line): |
27 |
> + """ |
28 |
> + These two regexes are taken from echangelog |
29 |
> + update_copyright(), except that we don't hardcode |
30 |
> + 1999 here (in order to be more generic). |
31 |
|
32 |
This comment makes little to no more sense, since the patterns taken |
33 |
from echangelog have changed considerably now :) |
34 |
|
35 |
|
36 |
-- |
37 |
Fabian Groffen |
38 |
Gentoo on a different level |