diff options
author | Alex Deymo <deymo@google.com> | 2016-02-18 11:00:40 -0800 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2016-02-29 18:04:36 -0800 |
commit | 390efedcb7e17587da765b6d682077cb7fa46ee1 (patch) | |
tree | 8a8016f57fbcc5c5848ef95536b653171e05cb2d /payload_consumer/install_plan.cc | |
parent | 14fd1ec41d1da4e849b724b762ca111a30c6628c (diff) |
Parse postinstall parameters from the payload metadata.
Payload v2 includes a description of the post-install command it should
run, while in payload v1 we use the default values. This patch mounts
the partition on the new top-level directory called /postinstall that
should already be created.
Bug: 27177071
TEST=FEATURES=test emerge-link update_engine
Change-Id: Iaedf3b01e5e1ad57c68bd316b4b6e79cbab35bb6
Diffstat (limited to 'payload_consumer/install_plan.cc')
-rw-r--r-- | payload_consumer/install_plan.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/payload_consumer/install_plan.cc b/payload_consumer/install_plan.cc index 572ff41f..51e85b35 100644 --- a/payload_consumer/install_plan.cc +++ b/payload_consumer/install_plan.cc @@ -59,9 +59,13 @@ bool InstallPlan::operator!=(const InstallPlan& that) const { void InstallPlan::Dump() const { string partitions_str; for (const auto& partition : partitions) { - partitions_str += base::StringPrintf( - ", part: %s (source_size: %" PRIu64 ", target_size %" PRIu64 ")", - partition.name.c_str(), partition.source_size, partition.target_size); + partitions_str += + base::StringPrintf(", part: %s (source_size: %" PRIu64 + ", target_size %" PRIu64 ", postinst:%s)", + partition.name.c_str(), + partition.source_size, + partition.target_size, + utils::ToString(partition.run_postinstall).c_str()); } LOG(INFO) << "InstallPlan: " @@ -109,7 +113,9 @@ bool InstallPlan::Partition::operator==( target_path == that.target_path && target_size == that.target_size && target_hash == that.target_hash && - run_postinstall == that.run_postinstall); + run_postinstall == that.run_postinstall && + postinstall_path == that.postinstall_path && + filesystem_type == that.filesystem_type); } } // namespace chromeos_update_engine |