зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1153566 - Incorrect re in _check_blacklisted_variables did not ignore comment. r=gps
--HG-- extra : rebase_source : fe0ce8cb121befee16dccaa0215cb24c5bdf76f9
This commit is contained in:
Родитель
03cc3bcefa
Коммит
2807063b52
|
@ -703,12 +703,12 @@ class RecursiveMakeBackend(CommonBackend):
|
|||
|
||||
def _check_blacklisted_variables(self, makefile_in, makefile_content):
|
||||
for x in MOZBUILD_VARIABLES:
|
||||
if re.search(r'[^#]\b%s\s*[:?+]?=' % x, makefile_content, re.M):
|
||||
if re.search(r'^[^#]*\b%s\s*[:?+]?=' % x, makefile_content, re.M):
|
||||
raise Exception('Variable %s is defined in %s. It should '
|
||||
'only be defined in moz.build files.' % (x, makefile_in))
|
||||
|
||||
for x in DEPRECATED_VARIABLES:
|
||||
if re.search(r'[^#]\b%s\s*[:?+]?=' % x, makefile_content, re.M):
|
||||
if re.search(r'^[^#]*\b%s\s*[:?+]?=' % x, makefile_content, re.M):
|
||||
raise Exception('Variable %s is defined in %s. This variable '
|
||||
'has been deprecated. It does nothing. It must be removed '
|
||||
'in order to build.' % (x, makefile_in))
|
||||
|
|
Загрузка…
Ссылка в новой задаче