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 07A1C1396D0 for ; Mon, 11 Sep 2017 21:44:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26FC51FC11F; Mon, 11 Sep 2017 21:43:59 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 E8BF01FC11F for ; Mon, 11 Sep 2017 21:43:58 +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 477EB3417E7 for ; Mon, 11 Sep 2017 21:43:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 37262908A for ; Mon, 11 Sep 2017 21:43:52 +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: <1505146396.217cc19519ffba50f077ff6e3e5c1b792eb4d69c.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: 217cc19519ffba50f077ff6e3e5c1b792eb4d69c X-VCS-Branch: repoman Date: Mon, 11 Sep 2017 21:43:52 +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: 03d9ade1-a5c6-4255-b8e6-fbe153244bc8 X-Archives-Hash: 80ba2ef12f78ae977ea9ace075c5d28e commit: 217cc19519ffba50f077ff6e3e5c1b792eb4d69c Author: Brian Dolbec gentoo org> AuthorDate: Sat Jul 15 01:07:59 2017 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Sep 11 16:13:16 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=217cc195 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'