|
Link Here
|
| 17 |
|
17 |
|
| 18 |
repoman_check_name = 'ebuild.badheader' |
18 |
repoman_check_name = 'ebuild.badheader' |
| 19 |
|
19 |
|
| 20 |
gentoo_copyright = r'^# Copyright ((1999|2\d\d\d)-)?%s Gentoo Authors$' |
20 |
gentoo_copyright = ( |
|
|
21 |
r'^# Copyright ((1999|2\d\d\d)-)?(?P<year2>%s) (?P<author>.*)$') |
| 21 |
gentoo_license = ( |
22 |
gentoo_license = ( |
| 22 |
'# Distributed under the terms' |
23 |
'# Distributed under the terms' |
| 23 |
' of the GNU General Public License v2') |
24 |
' of the GNU General Public License v2') |
|
Link Here
|
| 37 |
if num > 2: |
38 |
if num > 2: |
| 38 |
return |
39 |
return |
| 39 |
elif num == 0: |
40 |
elif num == 0: |
| 40 |
if not self.gentoo_copyright_re.match(line): |
41 |
match = self.gentoo_copyright_re.match(line) |
|
|
42 |
if match is None: |
| 43 |
return self.errors['COPYRIGHT_ERROR'] |
| 44 |
if not (match.group('author') == 'Gentoo Authors' or |
| 45 |
(int(match.group('year2')) < 2019) and |
| 46 |
match.group('author') == 'Gentoo Foundation'): |
| 41 |
return self.errors['COPYRIGHT_ERROR'] |
47 |
return self.errors['COPYRIGHT_ERROR'] |
| 42 |
elif num == 1 and line.rstrip('\n') != self.gentoo_license: |
48 |
elif num == 1 and line.rstrip('\n') != self.gentoo_license: |
| 43 |
return self.errors['LICENSE_ERROR'] |
49 |
return self.errors['LICENSE_ERROR'] |
| 44 |
- |
|
|