From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/patches/
Date: Tue, 5 Dec 2017 18:32:06 +0000 (UTC) [thread overview]
Message-ID: <1512498288.644fe3527d03c48e1e15ad2ea23850db78dde94a.dolsen@gentoo> (raw)
commit: 644fe3527d03c48e1e15ad2ea23850db78dde94a
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:02:58 2017 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 5 18:24:48 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=644fe352
repoman: New linechecks module, patches
.../repoman/modules/linechecks/patches/__init__.py | 21 +++++++++++++++++++++
.../repoman/modules/linechecks/patches/patches.py | 16 ++++++++++++++++
2 files changed, 37 insertions(+)
diff --git a/repoman/pym/repoman/modules/linechecks/patches/__init__.py b/repoman/pym/repoman/modules/linechecks/patches/__init__.py
new file mode 100644
index 000000000..67434f911
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/patches/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Patches plug-in module for repoman LineChecks.
+Performs PATCHES variable checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+ 'name': 'do',
+ 'description': doc,
+ 'provides':{
+ 'patches-check': {
+ 'name': "patches",
+ 'sourcefile': "patches",
+ 'class': "EbuildPatches",
+ 'description': doc,
+ },
+ }
+}
+
diff --git a/repoman/pym/repoman/modules/linechecks/patches/patches.py b/repoman/pym/repoman/modules/linechecks/patches/patches.py
new file mode 100644
index 000000000..63651cd7c
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/patches/patches.py
@@ -0,0 +1,16 @@
+
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class EbuildPatches(LineCheck):
+ """Ensure ebuilds use bash arrays for PATCHES to ensure white space safety"""
+ repoman_check_name = 'ebuild.patches'
+ re = re.compile(r'^\s*PATCHES=[^\(]')
+ error = 'PATCHES_ERROR'
+
+ def check_eapi(self, eapi):
+ return eapi in ("0", "1", "2", "3", "4", "4-python",
+ "4-slot-abi", "5", "5-hdepend", "5-progress")
next reply other threads:[~2017-12-05 18:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 18:32 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-30 4:23 [gentoo-commits] proj/portage:master commit in: repoman/pym/repoman/modules/linechecks/patches/ Zac Medico
2018-03-30 5:20 ` [gentoo-commits] proj/portage:repoman " Zac Medico
2018-03-30 0:48 Brian Dolbec
2018-03-29 21:35 Brian Dolbec
2017-12-06 0:16 Brian Dolbec
2017-11-26 17:46 Brian Dolbec
2017-09-11 21:43 Brian Dolbec
2017-07-15 2:29 Brian Dolbec
2017-07-15 2:08 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1512498288.644fe3527d03c48e1e15ad2ea23850db78dde94a.dolsen@gentoo \
--to=dolsen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox