History log of /system/update_engine/payload_generator/annotated_operation.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
be77e9ed80be653fadd76dfda6ef325160678b27 06-Apr-2016 Alex Deymo <deymo@google.com> delta_generator: Use REPLACE_XZ in deltas when allowed.

This patch moves the generation of the best allowed full operation to a
new function which now includes ZERO, REPLACE, REPLACE_BZ and REPLACE_XZ
when allowed. This function is used to produce a full operation
whenever it is needed in the "full" payload generator and the AB "delta"
payload generator.

Bug: 24578399
TEST=brillo_update_payload generated REPLACE_XZ operations for a delta payload that was using REPLACE_BZ operations and merged them.
TEST=brillo_update_payload generated a full payload with REPLACE, REPLACE_BZ and REPLACE_XZ operations.
TEST=Updated unittests.

(cherry picked from commit 726aeca1c665910593761a1990ee50f22d98f53f)

Change-Id: I50684d5fa429f7110e5535ee4a7f29ac50b5a402
/system/update_engine/payload_generator/annotated_operation.h
3f39d5cc753905874d8d93bef94f857b8808f19e 13-Oct-2015 Alex Vakulenko <avakulenko@google.com> update_engine: Rename "chromeos" -> "brillo" in include paths and namespaces

libchromeos is transitioning to libbrillo and chromeos namespaces
and include directory is changing to brillo.

Bug: 24872993
Change-Id: I770659a95be380a50fe3b2ba9f91d65818f40945
/system/update_engine/payload_generator/annotated_operation.h
2d621a3cf2da7ff3b2a178594cb97ada6c4350d3 01-Oct-2015 Alex Deymo <deymo@google.com> Implement REPLACE_XZ on the update_engine.

This patch introduces the REPLACE_XZ operation, very similar to
REPLACE_BZ but using the XzExtentWriter instead. Minor cleanup of the
growing list of operations included in this patch.

Bug: 23604708
Test: Added unittests.

Change-Id: Iefa9e2cda609fceab9311add16b7369cb88c98a2
/system/update_engine/payload_generator/annotated_operation.h
aea4c1cea20dda7ae7e85fc8924a2d784f70d806 20-Aug-2015 Alex Deymo <deymo@google.com> Re-license update_engine to Apache2

This patch automatically replaced the license on all text files from
Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as
a reference.

The license header was added to .gyp and .gypi files, the NOTICE was
replaced with a copy of the Apache2 license and MODULE_LICENSE_* file
was updated.

BUG=b/23084294
TEST=grep 'Chromium OS Authors' doesn't find anything.

Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
/system/update_engine/payload_generator/annotated_operation.h
a12ee11c78ac6d7c2605921a4006b6a7416e0c35 13-Aug-2015 Alex Deymo <deymo@chromium.org> update_engine: Move InstallOperation to the top level.

The InstallOperation message in the protobuf is a nested message
inside the DeltaArchiveManifest message, making all references to
operation types be very long names like
DeltaArchiveManifest_InstallOperation_Type_REPLACE_BZ while most other
messages are not nested in the DeltaArchiveManifest message.

To improve readability and to prepare for future update metadata
changes, this patch moves the InstallOperation message to the top level
and replaces all references to operation types with the new shorter
version like InstallOperation::REPLACE_BZ.

This change only impacts the scope of the generated classes and the
serialized format of the protobuf. This exact same question was
addressed by protobuf maintainers here:

https://groups.google.com/forum/#!topic/protobuf/azWAPa6hP4A

Finally coding style and indentation was automatically updated due to
the shorter names.

BUG=b:23179128
TEST=Unittest still pass.

Change-Id: I55add54265934cd1fd3e9cb786c5d3f784902d17
Reviewed-on: https://chromium-review.googlesource.com/293504
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
8cc502dacbccdab96824d42287f230ce04004784 10-Aug-2015 Sen Jiang <senj@chromium.org> update_engine: Change OperationsGenerator to use BlobFileWriter

BUG=chromium:517280
TEST=Unit test for BlobFileWriter

Change-Id: Ib49925676331acee97ff6b4cec38a81ca8b157a1
Reviewed-on: https://chromium-review.googlesource.com/291441
Tested-by: Sen Jiang <senj@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Sen Jiang <senj@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
6b9e38ef1180efe55e4a82bb18536d1b53fe493d 05-Jun-2015 Alex Deymo <deymo@chromium.org> update_engine: Use the FilesystemInterface to generate deltas.

This patch removes the FilesystemIterator used to iterate the file data
blocks, the metadata.{cc,h} files used to iterate the metadata blocks and
the ReadUnwrittenBlocks() method used to process the rest of the blocks.
Instead, these three cases are handled by the same DeltaReadFilesystem()
method using the FilesystemInterface abstraction for ext2.

The sub-file block handling was changed from (filename, offset, size) to
just the list of blocks (or Extents) and the parsing of the filesystem
was removed from the methods that produce operations. The filename is
kept just as a label for logging purposes.

This patch implies that the filesystem doesn't need to be mounted in
order to generate the payload, as all the data is accessed as blocks
in a partition. The mountpoint was removed from all the operations
generators, but it is still required to mount the old filesystem to
detect the minor version supported by the old update_engine. Also,
since the list of blocks is never accessed using the FIGETBSZ ioctl,
no payload_generator/ test require root privileges, nor the
delta_generator binary.

BUG=chromium:305832,chromium:331965
TEST=Updated unittest to use extents.

Change-Id: Ia2ea9433190258f70e3bce09f896b18326a7abf9
Reviewed-on: https://chromium-review.googlesource.com/275804
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
41e3474eebe3748a45aba4b297a7a313a1006c6c 11-May-2015 Gilad Arnold <garnold@chromium.org> update_engine: Merge contiguous operations (reprise).

This is reapplying CL:269604 with a small fix that prevents it from
adding spurious src_length fields when merging payload operations. This
also revises relevant unit tests to catch the said error. The original
change is described below.

Merges operations of type SOURCE_COPY, REPLACE, or REPLACE_BZ if they
have the same type, are contiguous, have only one destination extent,
and their combined block count does not exceed the chunk size.

BUG=chromium:461651
BUG=chromium:486497
TEST=Unit test (fails before fix, passes after)
TEST=Trybot

Change-Id: I9f3d7f653454e27177428f2d7c0e6485184a7f8b
Reviewed-on: https://chromium-review.googlesource.com/270268
Trybot-Ready: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Gilad Arnold <garnold@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
542032d92433045a66e888588d133a47c7fcf956 11-May-2015 Gilad Arnold <garnold@chromium.org> Revert "update_engine: Merge contiguous operations."

This reverts commit 6a3ea94766bb4972abbd629779914d80dada1245.

The CL is suspected to close the tree due to paygen failures.
See comments inline (delta_diff_generator.cc) for the culprit.

BUG=chromium:486497
TEST=trybot

Change-Id: Iaed694a79371e7de208b0de90f8e9cefd61dd7e6
Reviewed-on: https://chromium-review.googlesource.com/270183
Trybot-Ready: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
58455ae7fe87a312ae648d871a92e1485d0e9989 04-May-2015 Allie Wood <alliewood@chromium.org> update_engine: Merge contiguous operations.

Merges operations of type SOURCE_COPY, REPLACE, or REPLACE_BZ if they
have the same type, are contiguous, have only one destination extent,
and their combined block count does not exceed the chunk size.

BUG=chromium:461651
TEST=`cros flash --src-image-to-delta`, checking generated payloads
using `cros payload show --list_ops`, unit tests.
CQ-DEPEND=CL:269134

Change-Id: I5f71e6828561f2e0a6a8ab3e3aae4c362ea2ddde
Reviewed-on: https://chromium-review.googlesource.com/269604
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Allie Wood <alliewood@chromium.org>
Trybot-Ready: Allie Wood <alliewood@chromium.org>
Tested-by: Allie Wood <alliewood@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h
477aec2166a571cbe28081d806c3226e8b31b6e9 25-Mar-2015 Alex Deymo <deymo@chromium.org> update_engine: Refactor OperationsGenerator into a base class.

This refactor cleans up the interface of the algorithms that generate
the list of rootfs and kernel operations removing the mention of a
Graph from it. The Graph class is only used by the in-place generator
because it requires to keep track of dependencies between operations
reading or writting the same block. The full update generator, using
only REPLACE or REPLACE_BZ doesn't need to use a graph to do that, but
in order to reuse some code, the interface was hacked that way.

This patch now uses two vectors of "AnnotatedOperations", which are
a mere InstallOperation as defined by the .proto file plus a name
used for logging purposes only. Both rootfs and kernel operations
have now the same type on the interface, allowing to share common
functions handling those.

BUG=chromium:331965
TEST=FEATURES=test emerge-link update_engine

Change-Id: I78566bbecb948634b7ecc8d086766ce67a79b43e
Reviewed-on: https://chromium-review.googlesource.com/262281
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
/system/update_engine/payload_generator/annotated_operation.h