update_engine: Add fds for the source partitions.
Add new fds for the source partition, one for the rootfs and another for
the kernel. These are opened if we have a delta update with minor
version 2.
This change also adds support for changing the minor versions in tests.
There is a new private member, supported_minor_version_, which defaults
to kSupportedMinorPayloadVersion. It is set in the unit tests with calls
to SetSupportedVersion.
BUG=chromium:463573
TEST=`FEATURES=test emerge-link update_engine`
Change-Id: Ib988c91eb450b2499c615ae65b271691dfd9c651
Reviewed-on: https://chromium-review.googlesource.com/260950
Trybot-Ready: Allie Wood <alliewood@chromium.org>
Tested-by: Allie Wood <alliewood@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Allie Wood <alliewood@chromium.org>
diff --git a/install_plan.cc b/install_plan.cc
index d991a35..7b97876 100644
--- a/install_plan.cc
+++ b/install_plan.cc
@@ -21,6 +21,8 @@
const string& metadata_signature,
const string& install_path,
const string& kernel_install_path,
+ const string& source_path,
+ const string& kernel_source_path,
const string& public_key_rsa)
: is_resume(is_resume),
is_full_update(is_full_update),
@@ -31,6 +33,8 @@
metadata_signature(metadata_signature),
install_path(install_path),
kernel_install_path(kernel_install_path),
+ source_path(source_path),
+ kernel_source_path(kernel_source_path),
kernel_size(0),
rootfs_size(0),
hash_checks_mandatory(false),
@@ -56,7 +60,9 @@
(metadata_size == that.metadata_size) &&
(metadata_signature == that.metadata_signature) &&
(install_path == that.install_path) &&
- (kernel_install_path == that.kernel_install_path));
+ (kernel_install_path == that.kernel_install_path) &&
+ (source_path == that.source_path) &&
+ (kernel_source_path == that.kernel_source_path));
}
bool InstallPlan::operator!=(const InstallPlan& that) const {
@@ -74,6 +80,8 @@
<< ", metadata signature: " << metadata_signature
<< ", install_path: " << install_path
<< ", kernel_install_path: " << kernel_install_path
+ << ", source_path: " << source_path
+ << ", kernel_source_path: " << kernel_source_path
<< ", hash_checks_mandatory: " << utils::ToString(
hash_checks_mandatory)
<< ", powerwash_required: " << utils::ToString(