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 307F4139695 for ; Sat, 15 Jul 2017 02:08:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78F48E0E0F; Sat, 15 Jul 2017 02:08:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 59A73E0E0F for ; Sat, 15 Jul 2017 02:08:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 6D8713418EC for ; Sat, 15 Jul 2017 02:08:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 52C5B74BE for ; Sat, 15 Jul 2017 02:08:47 +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: <1500084507.8bda7b8a56a49f8d97a00beb47efd2e980d0d0be.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/emake/ X-VCS-Repository: proj/portage X-VCS-Files: repoman/pym/repoman/modules/linechecks/emake/__init__.py repoman/pym/repoman/modules/linechecks/emake/emake.py X-VCS-Directories: repoman/pym/repoman/modules/linechecks/emake/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 8bda7b8a56a49f8d97a00beb47efd2e980d0d0be X-VCS-Branch: repoman Date: Sat, 15 Jul 2017 02:08:47 +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: 953e3e59-d496-4f8b-ba04-d5331837aeaf X-Archives-Hash: 657d6b683ceeddaf6817eab2267cee74 commit: 8bda7b8a56a49f8d97a00beb47efd2e980d0d0be Author: Brian Dolbec gentoo org> AuthorDate: Sat Jul 15 01:00:30 2017 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Jul 15 02:08:27 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=8bda7b8a repoman: New linechecks module, emake .../repoman/modules/linechecks/emake/__init__.py | 27 ++++++++++++++++++++++ .../pym/repoman/modules/linechecks/emake/emake.py | 23 ++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/repoman/pym/repoman/modules/linechecks/emake/__init__.py b/repoman/pym/repoman/modules/linechecks/emake/__init__.py new file mode 100644 index 000000000..2e930dae8 --- /dev/null +++ b/repoman/pym/repoman/modules/linechecks/emake/__init__.py @@ -0,0 +1,27 @@ +# Copyright 2015-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +doc = """Emake plug-in module for repoman LineChecks. +Performs emake checks on ebuilds.""" +__doc__ = doc[:] + + +module_spec = { + 'name': 'do', + 'description': doc, + 'provides':{ + 'paralleldisabled-check': { + 'name': "paralleldisabled", + 'sourcefile': "emake", + 'class': "EMakeParallelDisabledViaMAKEOPTS", + 'description': doc, + }, + 'autodefault-check': { + 'name': "autodefault", + 'sourcefile': "emake", + 'class': "WantAutoDefaultValue", + 'description': doc, + }, + } +} + diff --git a/repoman/pym/repoman/modules/linechecks/emake/emake.py b/repoman/pym/repoman/modules/linechecks/emake/emake.py new file mode 100644 index 000000000..e1e3e638e --- /dev/null +++ b/repoman/pym/repoman/modules/linechecks/emake/emake.py @@ -0,0 +1,23 @@ + +import re + +from repoman.modules.linechecks.base import LineCheck + + +class EMakeParallelDisabledViaMAKEOPTS(LineCheck): + """Check for MAKEOPTS=-j1 that disables parallelization.""" + repoman_check_name = 'upstream.workaround' + re = re.compile(r'^\s*MAKEOPTS=(\'|")?.*-j\s*1\b') + error = 'EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS' + + +class WantAutoDefaultValue(LineCheck): + """Check setting WANT_AUTO* to latest (default value).""" + repoman_check_name = 'ebuild.minorsyn' + _re = re.compile(r'^WANT_AUTO(CONF|MAKE)=(\'|")?latest') + + def check(self, num, line): + m = self._re.match(line) + if m is not None: + return 'WANT_AUTO' + m.group(1) + \ + ' redundantly set to default value "latest" on line: %d'