aboutsummaryrefslogtreecommitdiffstats
path: root/repoman
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2019-06-18 13:48:33 +0200
committerZac Medico <zmedico@gentoo.org>2019-06-18 11:41:31 -0700
commit31465138ddc319a98eae71f95b9fb3a07b866f62 (patch)
tree6dcde047621e017d54aedf4a8303430a749f20ce /repoman
parentebuild: fix QA_SONAME_NO_SYMLINK (diff)
downloadgentoo-portage-31465138ddc319a98eae71f95b9fb3a07b866f62.tar.xz
gentoo-portage-31465138ddc319a98eae71f95b9fb3a07b866f62.zip
repoman: Allow legacy "Gentoo Foundation" copyright before 2019.
Bug: https://bugs.gentoo.org/688278 Signed-off-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'repoman')
-rw-r--r--repoman/lib/repoman/modules/linechecks/gentoo_header/header.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py b/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
index f94a8a50bb7..1f035a97e6a 100644
--- a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
+++ b/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
@@ -17,7 +17,8 @@ class EbuildHeader(LineCheck):
repoman_check_name = 'ebuild.badheader'
- gentoo_copyright = r'^# Copyright ((1999|2\d\d\d)-)?%s Gentoo Authors$'
+ gentoo_copyright = (
+ r'^# Copyright ((1999|2\d\d\d)-)?(?P<year2>%s) (?P<author>.*)$')
gentoo_license = (
'# Distributed under the terms'
' of the GNU General Public License v2')
@@ -37,7 +38,12 @@ class EbuildHeader(LineCheck):
if num > 2:
return
elif num == 0:
- if not self.gentoo_copyright_re.match(line):
+ match = self.gentoo_copyright_re.match(line)
+ if match is None:
+ return self.errors['COPYRIGHT_ERROR']
+ if not (match.group('author') == 'Gentoo Authors' or
+ (int(match.group('year2')) < 2019 and
+ match.group('author') == 'Gentoo Foundation')):
return self.errors['COPYRIGHT_ERROR']
elif num == 1 and line.rstrip('\n') != self.gentoo_license:
return self.errors['LICENSE_ERROR']