1 |
Automatically convert 'Gentoo Foundation' copyright to 'Gentoo Authors' |
2 |
when updating the copyright date. |
3 |
--- |
4 |
repoman/lib/repoman/copyrights.py | 4 ++-- |
5 |
repoman/lib/repoman/tests/changelog/test_echangelog.py | 2 +- |
6 |
repoman/lib/repoman/tests/simple/test_simple.py | 4 ++-- |
7 |
3 files changed, 5 insertions(+), 5 deletions(-) |
8 |
|
9 |
diff --git a/repoman/lib/repoman/copyrights.py b/repoman/lib/repoman/copyrights.py |
10 |
index 25627b3fc..1eaaab660 100644 |
11 |
--- a/repoman/lib/repoman/copyrights.py |
12 |
+++ b/repoman/lib/repoman/copyrights.py |
13 |
@@ -31,7 +31,7 @@ class _copyright_repl(object): |
14 |
return matchobj.group(0) |
15 |
else: |
16 |
return matchobj.group(1) + matchobj.group(2) + \ |
17 |
- b'-' + self.year + matchobj.group(3) |
18 |
+ b'-' + self.year + b' Gentoo Authors' |
19 |
|
20 |
|
21 |
def update_copyright_year(year, line): |
22 |
@@ -51,7 +51,7 @@ def update_copyright_year(year, line): |
23 |
year = _unicode_encode(year) |
24 |
line = _unicode_encode(line) |
25 |
|
26 |
- line = _copyright_re1.sub(br'\1-' + year + br'\2', line) |
27 |
+ line = _copyright_re1.sub(br'\1-' + year + b' Gentoo Authors', line) |
28 |
line = _copyright_re2.sub(_copyright_repl(year), line) |
29 |
if not is_bytes: |
30 |
line = _unicode_decode(line) |
31 |
diff --git a/repoman/lib/repoman/tests/changelog/test_echangelog.py b/repoman/lib/repoman/tests/changelog/test_echangelog.py |
32 |
index 1640be268..e5e34f16c 100644 |
33 |
--- a/repoman/lib/repoman/tests/changelog/test_echangelog.py |
34 |
+++ b/repoman/lib/repoman/tests/changelog/test_echangelog.py |
35 |
@@ -30,7 +30,7 @@ class RepomanEchangelogTestCase(TestCase): |
36 |
os.makedirs(self.pkgdir) |
37 |
|
38 |
self.header_pkg = '# ChangeLog for %s/%s\n' % (self.cat, self.pkg) |
39 |
- self.header_copyright = '# Copyright 1999-%s Gentoo Foundation; Distributed under the GPL v2\n' % \ |
40 |
+ self.header_copyright = '# Copyright 1999-%s Gentoo Authors; Distributed under the GPL v2\n' % \ |
41 |
time.strftime('%Y', time.gmtime()) |
42 |
self.header_cvs = '# $Header: $\n' |
43 |
|
44 |
diff --git a/repoman/lib/repoman/tests/simple/test_simple.py b/repoman/lib/repoman/tests/simple/test_simple.py |
45 |
index 351dde2c7..b0cc43297 100644 |
46 |
--- a/repoman/lib/repoman/tests/simple/test_simple.py |
47 |
+++ b/repoman/lib/repoman/tests/simple/test_simple.py |
48 |
@@ -23,12 +23,12 @@ class SimpleRepomanTestCase(TestCase): |
49 |
( |
50 |
'2011', |
51 |
'# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2', |
52 |
- '# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2', |
53 |
+ '# Copyright 1999-2011 Gentoo Authors; Distributed under the GPL v2', |
54 |
), |
55 |
( |
56 |
'2011', |
57 |
'# Copyright 1999 Gentoo Foundation; Distributed under the GPL v2', |
58 |
- '# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2', |
59 |
+ '# Copyright 1999-2011 Gentoo Authors; Distributed under the GPL v2', |
60 |
), |
61 |
( |
62 |
'1999', |
63 |
-- |
64 |
2.19.0 |