update_engine: Remove rootfs_mountpt from ImageConfig.
The mounted rootfs is not used anymore during opeartions generation so
this patch removes the setting from the ImageConfig. The --new_dir flag
is now deprecated because of this.
The --old_dir is still being used when no --minor_version is passed, to
autodetect the minor version of the old image.
With this patch, the rootfs and kernel partitions have a more generic
description in the config.
BUG=None
TEST=Unittest still pass.
Change-Id: I0398493a44f8c09159a93a716f2168f45e8f8df9
Reviewed-on: https://chromium-review.googlesource.com/275805
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index 381f777..3a175c4 100644
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -519,9 +519,6 @@
nullptr));
LOG(INFO) << "delta path: " << state->delta_path;
{
- string a_mnt, b_mnt;
- ScopedLoopMounter a_mounter(state->a_img, &a_mnt, MS_RDONLY);
- ScopedLoopMounter b_mounter(state->b_img, &b_mnt, MS_RDONLY);
const string private_key =
signature_test == kSignatureGenerator ? kUnittestPrivateKeyPath : "";
@@ -531,10 +528,9 @@
payload_config.rootfs_partition_size = kRootFSPartitionSize;
payload_config.minor_version = minor_version;
if (!full_rootfs) {
- payload_config.source.rootfs_part = state->a_img;
- payload_config.source.rootfs_mountpt = a_mnt;
+ payload_config.source.rootfs.path = state->a_img;
if (!full_kernel)
- payload_config.source.kernel_part = state->old_kernel;
+ payload_config.source.kernel.path = state->old_kernel;
payload_config.source.image_info = old_image_info;
EXPECT_TRUE(payload_config.source.LoadImageSize());
@@ -542,9 +538,8 @@
if (payload_config.chunk_size == -1)
payload_config.chunk_size = kDefaultChunkSize;
}
- payload_config.target.rootfs_part = state->b_img;
- payload_config.target.rootfs_mountpt = b_mnt;
- payload_config.target.kernel_part = state->new_kernel;
+ payload_config.target.rootfs.path = state->b_img;
+ payload_config.target.kernel.path = state->new_kernel;
payload_config.target.image_info = new_image_info;
EXPECT_TRUE(payload_config.target.LoadImageSize());