Emit warning when build.prop import can't be resolved

Some mountpoints are only available at device runtime, so ignore import
failures in release tools.

Bug: 214322896
Test: th
Change-Id: I1e8c4fb08c6b825fa19c0f0e019dfaf2b03f2927
This commit is contained in:
Kelvin Zhang
2022-02-17 13:07:55 -08:00
parent 21118bba67
commit 42ab828754

View File

@@ -1025,7 +1025,8 @@ class PartitionBuildProps(object):
import_path = tokens[1] import_path = tokens[1]
if not re.match(r'^/{}/.*\.prop$'.format(self.partition), import_path): if not re.match(r'^/{}/.*\.prop$'.format(self.partition), import_path):
raise ValueError('Unrecognized import path {}'.format(line)) logger.warn('Unrecognized import path {}'.format(line))
return {}
# We only recognize a subset of import statement that the init process # We only recognize a subset of import statement that the init process
# supports. And we can loose the restriction based on how the dynamic # supports. And we can loose the restriction based on how the dynamic