releasetools: Add --oem_no_mount option.
We may have devices with OEM-specific properties but without an OEM partition (e.g. the properties might be set by init based on hardware SKUs). For such devices, we supply --oem_no_mount to skip mounting the OEM partition in the updater-script. The option is only meaningful when -o (--oem_settings) is specified. Bug: 27359929 Change-Id: Ic08396e478a82be4188e980e704b33b4f704a8d7
This commit is contained in:
@@ -83,11 +83,17 @@ class EdifyGenerator(object):
|
||||
raise ValueError("must specify an OEM property")
|
||||
if not value:
|
||||
raise ValueError("must specify the OEM value")
|
||||
cmd = ('file_getprop("/oem/oem.prop", "{name}") == "{value}" || '
|
||||
'abort("This package expects the value \\"{value}\\" for '
|
||||
'\\"{name}\\" on the OEM partition; this has value \\"" + '
|
||||
'file_getprop("/oem/oem.prop", "{name}") + "\\".");').format(
|
||||
name=name, value=value)
|
||||
if common.OPTIONS.oem_no_mount:
|
||||
cmd = ('getprop("{name}") == "{value}" || '
|
||||
'abort("This package expects the value \\"{value}\\" for '
|
||||
'\\"{name}\\"; this has value \\"" + '
|
||||
'getprop("{name}") + "\\".");').format(name=name, value=value)
|
||||
else:
|
||||
cmd = ('file_getprop("/oem/oem.prop", "{name}") == "{value}" || '
|
||||
'abort("This package expects the value \\"{value}\\" for '
|
||||
'\\"{name}\\" on the OEM partition; this has value \\"" + '
|
||||
'file_getprop("/oem/oem.prop", "{name}") + "\\".");').format(
|
||||
name=name, value=value)
|
||||
self.script.append(cmd)
|
||||
|
||||
def AssertSomeFingerprint(self, *fp):
|
||||
|
Reference in New Issue
Block a user