summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Górny <gentoo@mgorny.alt.pl>2010-07-14 10:16:14 +0200
committerZac Medico <zmedico@gentoo.org>2010-07-14 01:21:52 -0700
commit393c3752b59fdd3fd57410323ceb4a377264fa64 (patch)
tree20308ae77b8516758977126cbb013a6b6a11dd88
parenta9360035610dc73c851e9c9b6dfa9b5d42059d8d (diff)
downloadportage-393c3752b59fdd3fd57410323ceb4a377264fa64.tar.gz
portage-393c3752b59fdd3fd57410323ceb4a377264fa64.tar.bz2
portage-393c3752b59fdd3fd57410323ceb4a377264fa64.zip
Make copyright/CVS header checks more strict.
-rw-r--r--pym/repoman/checks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 025fdf9bf..96c7969ad 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -70,8 +70,8 @@ class EbuildHeader(LineCheck):
gentoo_copyright = r'^# Copyright ((1999|2\d\d\d)-)?%s Gentoo Foundation$'
# Why a regex here, use a string match
# gentoo_license = re.compile(r'^# Distributed under the terms of the GNU General Public License v2$')
- gentoo_license = r'# Distributed under the terms of the GNU General Public License v2'
- cvs_header = re.compile(r'^#\s*\$Header.*\$$')
+ gentoo_license = '# Distributed under the terms of the GNU General Public License v2'
+ cvs_header = re.compile(r'^# \$Header: .*\$$')
def new(self, pkg):
if pkg.mtime is None:
@@ -87,7 +87,7 @@ class EbuildHeader(LineCheck):
elif num == 0:
if not self.gentoo_copyright_re.match(line):
return errors.COPYRIGHT_ERROR
- elif num == 1 and line.strip() != self.gentoo_license:
+ elif num == 1 and line.rstrip('\n') != self.gentoo_license:
return errors.LICENSE_ERROR
elif num == 2:
if not self.cvs_header.match(line):