From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1013665-garchives=archives.gentoo.org@lists.gentoo.org> 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 6291B1382C5 for <garchives@archives.gentoo.org>; Fri, 30 Mar 2018 05:20:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34E93E0929; Fri, 30 Mar 2018 05:20:50 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 F2333E0929 for <gentoo-commits@lists.gentoo.org>; Fri, 30 Mar 2018 05:20:49 +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 D0258335D2F for <gentoo-commits@lists.gentoo.org>; Fri, 30 Mar 2018 05:20:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 73E5325C for <gentoo-commits@lists.gentoo.org>; Fri, 30 Mar 2018 05:20:46 +0000 (UTC) From: "Zac Medico" <zmedico@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" <zmedico@gentoo.org> Message-ID: <1522381877.ac1df05ac0d49c3c98518d77a892d2c18ad38195.zmedico@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: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ac1df05ac0d49c3c98518d77a892d2c18ad38195 X-VCS-Branch: repoman Date: Fri, 30 Mar 2018 05:20:46 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 0a0d6427-9308-4fa5-ae3f-9cdf7c1a010b X-Archives-Hash: 0166e355d687f1a9e3d8c812ff4145d1 commit: ac1df05ac0d49c3c98518d77a892d2c18ad38195 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Jul 15 01:00:30 2017 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Fri Mar 30 03:51:17 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ac1df05a 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'