From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 86C561386F1 for ; Sun, 9 Aug 2015 18:12:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6E257141E3; Sun, 9 Aug 2015 18:12:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ED555141CD for ; Sun, 9 Aug 2015 18:12:05 +0000 (UTC) Received: from sf.home (host86-155-193-19.range86-155.btcentralplus.com [86.155.193.19]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id A00EF340901; Sun, 9 Aug 2015 18:12:04 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id DBDAF158529F8; Sun, 9 Aug 2015 19:11:58 +0100 (BST) From: Sergei Trofimovich To: gentoo-portage-dev@lists.gentoo.org Cc: Sergei Trofimovich Subject: [gentoo-portage-dev] [PATCH] Switch to new git '# $Id$' header format Date: Sun, 9 Aug 2015 19:11:57 +0100 Message-Id: <1439143917-6268-1-git-send-email-slyfox@gentoo.org> X-Mailer: git-send-email 2.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org X-Archives-Salt: 087d12e2-2bdf-4ce8-8d0d-a9f7457c025e X-Archives-Hash: c1f8218b70c6244a14600c8f33a8c72f From: Sergei Trofimovich Currently repoman complains on every ebuild in ::gentoo. Signed-off-by: Sergei Trofimovich --- 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