New setting to mark postinstall as optional.
This setting allows to mark a postinstall script as optional. This
allows the postinstall program to fail when it is not strictly required
to run for the update to succeed.
Bug: 27178350
TEST=Added unittest. Sideloaded an update with an optional postinstall.
Change-Id: I41956d3308f3458b6bf94b835c9b5e470c84ca41
diff --git a/update_metadata.proto b/update_metadata.proto
index 222542f..454c736 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -235,6 +235,10 @@
// associated operation blobs (in operations[i].data_offset, data_length)
// should be stored contiguously and in the same order.
repeated InstallOperation operations = 8;
+
+ // Whether a failure in the postinstall step for this partition should be
+ // ignored.
+ optional bool postinstall_optional = 9;
}
message DeltaArchiveManifest {