public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-07-15  2:08 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-07-15  2:08 UTC (permalink / raw
  To: gentoo-commits

commit:     5abbad0ed3dda506f485c91a94250054abac3bb2
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 02:08:28 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5abbad0e

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-07-15  2:29 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-07-15  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     c9e19d980de83ce9e3142f784f3a3a43d202c0e9
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jul 15 02:25:44 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c9e19d98

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-09-11 21:43 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-09-11 21:43 UTC (permalink / raw
  To: gentoo-commits

commit:     faabe3297ec32e9b4a12cd622aab0280693f264d
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Sep 11 16:13:15 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=faabe329

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-11-26 17:46 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-11-26 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e136221a9e7a393a399fb995d738998781cfdd99
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Nov 26 17:32:18 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e136221a

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-12-05 18:32 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-12-05 18:32 UTC (permalink / raw
  To: gentoo-commits

commit:     4157d8495b10aae37f3c0e1ae73e854066453ba3
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 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=4157d849

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2017-12-06  0:16 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2017-12-06  0:16 UTC (permalink / raw
  To: gentoo-commits

commit:     b08b55e65daa058eec6958609869e534d6f78d70
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Wed Dec  6 00:13:27 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b08b55e6

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2018-03-29 21:35 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2018-03-29 21:35 UTC (permalink / raw
  To: gentoo-commits

commit:     28875d7dce8e0421029fb57298385a5c20d68bef
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Mar 29 20:43:38 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=28875d7d

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2018-03-30  0:48 Brian Dolbec
  0 siblings, 0 replies; 9+ messages in thread
From: Brian Dolbec @ 2018-03-30  0:48 UTC (permalink / raw
  To: gentoo-commits

commit:     176b456c8725432346affcfdbbd449203c308d88
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 2017 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Fri Mar 30 00:43:45 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=176b456c

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/
@ 2018-03-30  5:20 Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2018-03-30  5:20 UTC (permalink / raw
  To: gentoo-commits

commit:     5e6c14c41051daca8d01fbc0dd5b567c17ebac51
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 15 01:01:52 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=5e6c14c4

repoman: New linechecks module, helpers

 .../repoman/modules/linechecks/helpers/__init__.py | 21 +++++++++++++++++++++
 .../repoman/modules/linechecks/helpers/offset.py   | 22 ++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/__init__.py b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
new file mode 100644
index 000000000..e2d12afe4
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/__init__.py
@@ -0,0 +1,21 @@
+# Copyright 2015-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+doc = """Helpers plug-in module for repoman LineChecks.
+Performs variable helpers checks on ebuilds."""
+__doc__ = doc[:]
+
+
+module_spec = {
+	'name': 'do',
+	'description': doc,
+	'provides':{
+		'nooffset-check': {
+			'name': "nooffset",
+			'sourcefile': "offset",
+			'class': "NoOffsetWithHelpers",
+			'description': doc,
+		},
+	}
+}
+

diff --git a/repoman/pym/repoman/modules/linechecks/helpers/offset.py b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
new file mode 100644
index 000000000..5d7624a68
--- /dev/null
+++ b/repoman/pym/repoman/modules/linechecks/helpers/offset.py
@@ -0,0 +1,22 @@
+
+import re
+
+from repoman.modules.linechecks.base import LineCheck
+
+
+class NoOffsetWithHelpers(LineCheck):
+	""" Check that the image location, the alternate root offset, and the
+	offset prefix (D, ROOT, ED, EROOT and EPREFIX) are not used with
+	helpers """
+
+	repoman_check_name = 'variable.usedwithhelpers'
+	# Ignore matches in quoted strings like this:
+	# elog "installed into ${ROOT}usr/share/php5/apc/."
+	_install_funcs = (
+		'docinto|do(compress|dir|hard)'
+		'|exeinto|fowners|fperms|insinto|into')
+	_quoted_vars = 'D|ROOT|ED|EROOT|EPREFIX'
+	re = re.compile(
+		r'^[^#"\']*\b(%s)\s+"?\$\{?(%s)\b.*' %
+		(_install_funcs, _quoted_vars))
+	error = 'NO_OFFSET_WITH_HELPERS'


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-30  5:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-30  0:48 [gentoo-commits] proj/portage:repoman commit in: repoman/pym/repoman/modules/linechecks/helpers/ Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2018-03-30  5:20 Zac Medico
2018-03-29 21:35 Brian Dolbec
2017-12-06  0:16 Brian Dolbec
2017-12-05 18:32 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox