* [gentoo-portage-dev] [PATCH] Switch to new git '# $Id$' header format
@ 2015-08-09 18:11 Sergei Trofimovich
2015-08-10 7:26 ` Alexander Berntsen
2015-08-10 14:46 ` Michał Górny
0 siblings, 2 replies; 3+ messages in thread
From: Sergei Trofimovich @ 2015-08-09 18:11 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Sergei Trofimovich
From: Sergei Trofimovich <siarheit@google.com>
Currently repoman complains on every ebuild in ::gentoo.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
---
pym/repoman/checks.py | 7 +++----
pym/repoman/errors.py | 2 +-
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/pym/repoman/checks.py b/pym/repoman/checks.py
index 5f37648..4ab23d1 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 3833be6..74a5959 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'
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-10 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-09 18:11 [gentoo-portage-dev] [PATCH] Switch to new git '# $Id$' header format Sergei Trofimovich
2015-08-10 7:26 ` Alexander Berntsen
2015-08-10 14:46 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox