aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <siarheit@google.com>2015-08-10 16:19:26 +0200
committerMichał Górny <mgorny@gentoo.org>2015-08-10 16:43:30 +0200
commitaef2873cd86d91ffd4badec45d7d310d917a12f7 (patch)
tree5242a909b7b2cb7685fc9e2c073ad4b5c0721984
parentsimilar_name_search: used indexed repos where appropriate (bug 556764) (diff)
downloadportage-aef2873cd86d91ffd4badec45d7d310d917a12f7.tar.gz
portage-aef2873cd86d91ffd4badec45d7d310d917a12f7.tar.bz2
portage-aef2873cd86d91ffd4badec45d7d310d917a12f7.zip
repoman: Switch to new git '# $Id$' header format
Currently repoman complains on every ebuild in ::gentoo. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Reviewed-by: Alexander Berntsen <bernalex@gentoo.org>
-rw-r--r--pym/repoman/checks.py7
-rw-r--r--pym/repoman/errors.py2
2 files changed, 4 insertions, 5 deletions
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 5f3764832..4ab23d1d6 100644
--- a/pym/repoman/checks.py
+++ b/pym/repoman/checks.py
@@ -81,7 +81,7 @@ class EbuildHeader(LineCheck):
# 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 = '# Distributed under the terms of the GNU General Public License v2'
- cvs_header = re.compile(r'^# \$Header: .*\$$')
+ id_header = '# $Id$'
ignore_comment = False
def new(self, pkg):
@@ -100,9 +100,8 @@ class EbuildHeader(LineCheck):
return errors.COPYRIGHT_ERROR
elif num == 1 and line.rstrip('\n') != self.gentoo_license:
return errors.LICENSE_ERROR
- elif num == 2:
- if not self.cvs_header.match(line):
- return errors.CVS_HEADER_ERROR
+ elif num == 2 and line.rstrip('\n') != self.id_header:
+ return errors.ID_HEADER_ERROR
class EbuildWhitespace(LineCheck):
diff --git a/pym/repoman/errors.py b/pym/repoman/errors.py
index 3833be671..74a595970 100644
--- a/pym/repoman/errors.py
+++ b/pym/repoman/errors.py
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
COPYRIGHT_ERROR = 'Invalid Gentoo Copyright on line: %d'
LICENSE_ERROR = 'Invalid Gentoo/GPL License on line: %d'
-CVS_HEADER_ERROR = 'Malformed CVS Header on line: %d'
+ID_HEADER_ERROR = 'Malformed Id header on line: %d'
LEADING_SPACES_ERROR = 'Ebuild contains leading spaces on line: %d'
TRAILING_WHITESPACE_ERROR = 'Trailing whitespace error on line: %d'
READONLY_ASSIGNMENT_ERROR = 'Ebuild contains assignment to read-only variable on line: %d'