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
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index f4f9178..560f3a7 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1025,7 +1025,8 @@
import_path = tokens[1]
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
# supports. And we can loose the restriction based on how the dynamic