Revert "cros_generate_update_payload: Switch update_engine to major version 2"
This reverts commit 0e274ee7241f5d0214d135f8b5df95317dcdecd6.
Reason for revert: <crbug.com/914705>
Original change's description:
> cros_generate_update_payload: Switch update_engine to major version 2
>
> Per this change, we switch the update payload generation on the server side to
> major version 2. This new version includes smaller payloads (5%-10%) and has the
> capability to install multiple partitions (in comparison to a fixed two, kernel
> and root.) This affects all boards. For more information about the client
> support and the needed stepping stone refer to the attached issue.
>
> The changes in this patch includes:
> - Generating a postinstall file to be passed to paygen.
> - Added the metadata signatures to the payload itself.
>
> BUG=chromium:794404
> TEST=cros flash
> TEST=manually signed the payload and installed it.
>
> Change-Id: Ic520be3a04898f881d4ec745644462d144de43eb
> Reviewed-on: https://chromium-review.googlesource.com/1369104
> Commit-Ready: Amin Hassani <ahassani@chromium.org>
> Tested-by: Amin Hassani <ahassani@chromium.org>
> Reviewed-by: Amin Hassani <ahassani@chromium.org>
> Reviewed-by: Don Garrett <dgarrett@chromium.org>
Bug: chromium:794404
Bug: chromium:914705
Change-Id: I69853c275abc7ce62bc165578d6478161191c0ee
Reviewed-on: https://chromium-review.googlesource.com/c/1375531
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Tested-by: Amin Hassani <ahassani@chromium.org>
Commit-Queue: Amin Hassani <ahassani@chromium.org>
diff --git a/scripts/cros_generate_update_payload_unittest.py b/scripts/cros_generate_update_payload_unittest.py
index a3b935a..35dfc00 100644
--- a/scripts/cros_generate_update_payload_unittest.py
+++ b/scripts/cros_generate_update_payload_unittest.py
@@ -8,7 +8,6 @@
from __future__ import print_function
import os
-import tempfile
from chromite.lib import cros_build_lib
from chromite.lib import cros_test_lib
@@ -111,8 +110,6 @@
)
self.PatchObject(cros_build_lib, 'GetImageDiskPartitionInfo',
return_value=fake_partitions)
- self.PatchObject(tempfile, 'NamedTemporaryFile',
- return_value=type('file', (object,), {'name': temp}))
cros_generate_update_payload.main([
'--image', '/dev/null',
'--src_image', '/dev/null',
@@ -120,10 +117,10 @@
])
self.assertCommandContains([
- '--major_version=2',
- '--partition_names=root:kernel',
- '--new_partitions=' + ':'.join([temp, temp]),
- '--new_postinstall_config_file=' + temp,
- '--old_partitions=' + ':'.join([temp, temp]),
+ '--major_version=1',
+ '--new_image=' + temp,
+ '--new_kernel=' + temp,
+ '--old_image=' + temp,
+ '--old_kernel=' + temp,
'--rootfs_partition_size=4',
])