Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 688278 | Differences between
and this patch

Collapse All | Expand All

(-)a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py (-3 / +8 lines)
Lines 17-23 class EbuildHeader(LineCheck): 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')
Lines 37-43 class EbuildHeader(LineCheck): 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
- 

Return to bug 688278