* [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/modules/linechecks/gentoo_header/
@ 2019-06-18 18:51 Zac Medico
0 siblings, 0 replies; only message in thread
From: Zac Medico @ 2019-06-18 18:51 UTC (permalink / raw
To: gentoo-commits
commit: 31465138ddc319a98eae71f95b9fb3a07b866f62
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 18 11:48:33 2019 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 18:41:31 2019 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=31465138
repoman: Allow legacy "Gentoo Foundation" copyright before 2019.
Bug: https://bugs.gentoo.org/688278
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
| 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--git a/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py b/repoman/lib/repoman/modules/linechecks/gentoo_header/header.py
index f94a8a50b..1f035a97e 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']
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-06-18 18:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-18 18:51 [gentoo-commits] proj/portage:master commit in: repoman/lib/repoman/modules/linechecks/gentoo_header/ Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox