aboutsummaryrefslogtreecommitdiffstats
path: root/repoman
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2017-09-30 21:45:54 +0100
committerZac Medico <zmedico@gentoo.org>2018-05-01 01:28:43 -0700
commitd8d47bf451bb3fd6bce1cdb035a5f12253f5a167 (patch)
tree6ada4f0bafb51de8e4b3f1b611395550aff880ed /repoman
parentExport SYSROOT and ESYSROOT in ebuild env in EAPI 7 (diff)
downloadgentoo-portage-d8d47bf451bb3fd6bce1cdb035a5f12253f5a167.tar.xz
gentoo-portage-d8d47bf451bb3fd6bce1cdb035a5f12253f5a167.zip
Export BROOT to ebuild env in EAPI 7
Export the BROOT variable corresponding to the location where BDEPEND are installed. Bug: https://bugs.gentoo.org/317337
Diffstat (limited to 'repoman')
-rw-r--r--repoman/cnf/qa_data/qa_data.yaml2
-rw-r--r--repoman/man/repoman.12
-rw-r--r--repoman/pym/repoman/modules/linechecks/assignment/assignment.py9
-rw-r--r--repoman/pym/repoman/modules/linechecks/quotes/quotes.py3
4 files changed, 12 insertions, 4 deletions
diff --git a/repoman/cnf/qa_data/qa_data.yaml b/repoman/cnf/qa_data/qa_data.yaml
index 573cdb449d9..32994e01386 100644
--- a/repoman/cnf/qa_data/qa_data.yaml
+++ b/repoman/cnf/qa_data/qa_data.yaml
@@ -128,7 +128,7 @@ qahelp:
variable:
invalidchar: "A variable contains an invalid character that is not part of the ASCII character set"
readonly: "Assigning a readonly variable"
- usedwithhelpers: "Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers"
+ usedwithhelpers: "Ebuild uses D, ROOT, BROOT, ED, EROOT or EPREFIX with helpers"
virtual:
suspect: "Ebuild contains a package that usually should be pulled via virtual/, not directly."
wxwidgets:
diff --git a/repoman/man/repoman.1 b/repoman/man/repoman.1
index c87146b61c8..01f37dd99b3 100644
--- a/repoman/man/repoman.1
+++ b/repoman/man/repoman.1
@@ -432,7 +432,7 @@ character set.
Assigning a readonly variable
.TP
.B variable.usedwithhelpers
-Ebuild uses D, ROOT, ED, EROOT or EPREFIX with helpers
+Ebuild uses D, ROOT, BROOT, ED, EROOT or EPREFIX with helpers
.TP
.B virtual.suspect
Ebuild contains a package that usually should be pulled via virtual/,
diff --git a/repoman/pym/repoman/modules/linechecks/assignment/assignment.py b/repoman/pym/repoman/modules/linechecks/assignment/assignment.py
index 496c9d0925a..33bef8a08e0 100644
--- a/repoman/pym/repoman/modules/linechecks/assignment/assignment.py
+++ b/repoman/pym/repoman/modules/linechecks/assignment/assignment.py
@@ -1,7 +1,7 @@
import re
-from portage.eapi import eapi_supports_prefix
+from portage.eapi import eapi_supports_prefix, eapi_has_broot
from repoman.modules.linechecks.base import LineCheck
@@ -29,3 +29,10 @@ class Eapi3EbuildAssignment(EbuildAssignment):
def check_eapi(self, eapi):
return eapi_supports_prefix(eapi)
+class Eapi7EbuildAssignment(EbuildAssignment):
+ """Ensure ebuilds don't assign to readonly EAPI 7-introduced variables."""
+
+ readonly_assignment = re.compile(r'\s*(export\s+)?BROOT=')
+
+ def check_eapi(self, eapi):
+ return eapi_has_broot(eapi)
diff --git a/repoman/pym/repoman/modules/linechecks/quotes/quotes.py b/repoman/pym/repoman/modules/linechecks/quotes/quotes.py
index 68c594e2305..e5ea4d0ca6c 100644
--- a/repoman/pym/repoman/modules/linechecks/quotes/quotes.py
+++ b/repoman/pym/repoman/modules/linechecks/quotes/quotes.py
@@ -17,7 +17,8 @@ class EbuildQuote(LineCheck):
r'(^$)|(^\s*#.*)|(^\s*\w+=.*)' +
r'|(^\s*(' + "|".join(_ignored_commands) + r')\s+)')
ignore_comment = False
- var_names = ["D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "WORKDIR"]
+ var_names = [
+ "D", "DISTDIR", "FILESDIR", "S", "T", "ROOT", "BROOT", "WORKDIR"]
# EAPI=3/Prefix vars
var_names += ["ED", "EPREFIX", "EROOT"]