diff options
author | James Le Cuirot <chewi@gentoo.org> | 2017-09-30 21:45:54 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-05-01 01:28:43 -0700 |
commit | d8d47bf451bb3fd6bce1cdb035a5f12253f5a167 (patch) | |
tree | 6ada4f0bafb51de8e4b3f1b611395550aff880ed /repoman | |
parent | Export SYSROOT and ESYSROOT in ebuild env in EAPI 7 (diff) | |
download | portage-d8d47bf451bb3fd6bce1cdb035a5f12253f5a167.tar.gz portage-d8d47bf451bb3fd6bce1cdb035a5f12253f5a167.tar.bz2 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.yaml | 2 | ||||
-rw-r--r-- | repoman/man/repoman.1 | 2 | ||||
-rw-r--r-- | repoman/pym/repoman/modules/linechecks/assignment/assignment.py | 9 | ||||
-rw-r--r-- | repoman/pym/repoman/modules/linechecks/quotes/quotes.py | 3 |
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 573cdb449..32994e013 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 c87146b61..01f37dd99 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 496c9d092..33bef8a08 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 68c594e23..e5ea4d0ca 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"] |