From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C3A13139083 for ; Tue, 5 Dec 2017 18:32:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83F3FE103E; Tue, 5 Dec 2017 18:32:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5E6A6E103E for ; Tue, 5 Dec 2017 18:32:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2EE5E33FE2A for ; Tue, 5 Dec 2017 18:32:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 86AD6AE80 for ; Tue, 5 Dec 2017 18:32:07 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1512498289.d16e905704065e46f3eeab12dcbb9845937752b0.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/workaround/ X-VCS-Repository: proj/portage X-VCS-Files: repoman/pym/repoman/modules/linechecks/workaround/__init__.py repoman/pym/repoman/modules/linechecks/workaround/workarounds.py X-VCS-Directories: repoman/pym/repoman/modules/linechecks/workaround/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: d16e905704065e46f3eeab12dcbb9845937752b0 X-VCS-Branch: repoman Date: Tue, 5 Dec 2017 18:32:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 852da7c0-b85a-4845-8edc-c610284021bb X-Archives-Hash: 5c0ef9dec4bddf79849f38cf47e4a297 commit: d16e905704065e46f3eeab12dcbb9845937752b0 Author: Brian Dolbec gentoo org> AuthorDate: Sat Jul 15 01:07:59 2017 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Tue Dec 5 18:24:49 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=d16e9057 repoman: New linechecks module, workaround .../modules/linechecks/workaround/__init__.py | 27 ++++++++++++++++++++++ .../modules/linechecks/workaround/workarounds.py | 18 +++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/repoman/pym/repoman/modules/linechecks/workaround/__init__.py b/repoman/pym/repoman/modules/linechecks/workaround/__init__.py new file mode 100644 index 000000000..0b5aa70c8 --- /dev/null +++ b/repoman/pym/repoman/modules/linechecks/workaround/__init__.py @@ -0,0 +1,27 @@ +# Copyright 2015-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +doc = """Workaround plug-in module for repoman LineChecks. +Performs checks for upstream workarounds in ebuilds.""" +__doc__ = doc[:] + + +module_spec = { + 'name': 'do', + 'description': doc, + 'provides':{ + 'addpredict-check': { + 'name': "addpredict", + 'sourcefile': "workarounds", + 'class': "SandboxAddpredict", + 'description': doc, + }, + 'noasneeded-check': { + 'name': "noasneeded", + 'sourcefile': "workarounds", + 'class': "NoAsNeeded", + 'description': doc, + }, + } +} + diff --git a/repoman/pym/repoman/modules/linechecks/workaround/workarounds.py b/repoman/pym/repoman/modules/linechecks/workaround/workarounds.py new file mode 100644 index 000000000..37cb54314 --- /dev/null +++ b/repoman/pym/repoman/modules/linechecks/workaround/workarounds.py @@ -0,0 +1,18 @@ + +import re + +from repoman.modules.linechecks.base import LineCheck + + +class NoAsNeeded(LineCheck): + """Check for calls to the no-as-needed function.""" + repoman_check_name = 'upstream.workaround' + re = re.compile(r'.*\$\(no-as-needed\)') + error = 'NO_AS_NEEDED' + + +class SandboxAddpredict(LineCheck): + """Check for calls to the addpredict function.""" + repoman_check_name = 'upstream.workaround' + re = re.compile(r'(^|\s)addpredict\b') + error = 'SANDBOX_ADDPREDICT'