am 35da9685
: Merge "Use the basename of file_contexts from the info dict."
* commit '35da9685f0d3bb367b50aaa4c476b12907099f77': Use the basename of file_contexts from the info dict.
This commit is contained in:
@@ -162,11 +162,12 @@ def LoadInfoDict(input_file, input_dir=None):
|
|||||||
# to build images than the one running on device, such as when enabling
|
# to build images than the one running on device, such as when enabling
|
||||||
# system_root_image. In that case, we must have the one for image
|
# system_root_image. In that case, we must have the one for image
|
||||||
# generation copied to META/.
|
# generation copied to META/.
|
||||||
fc_config = os.path.join(input_dir, "META", "file_contexts.bin")
|
fc_basename = os.path.basename(d.get("selinux_fc", "file_contexts"))
|
||||||
|
fc_config = os.path.join(input_dir, "META", fc_basename)
|
||||||
if d.get("system_root_image") == "true":
|
if d.get("system_root_image") == "true":
|
||||||
assert os.path.exists(fc_config)
|
assert os.path.exists(fc_config)
|
||||||
if not os.path.exists(fc_config):
|
if not os.path.exists(fc_config):
|
||||||
fc_config = os.path.join(input_dir, "BOOT", "RAMDISK", "file_contexts.bin")
|
fc_config = os.path.join(input_dir, "BOOT", "RAMDISK", fc_basename)
|
||||||
if not os.path.exists(fc_config):
|
if not os.path.exists(fc_config):
|
||||||
fc_config = None
|
fc_config = None
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user