History log of /system/update_engine/image_properties.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3be05c82442b2fbab693b6399f64610e8542462b 23-Oct-2015 Alex Deymo <deymo@google.com> Fix use-after-free in unittest setup code.

When setting the root prefix in a unittest, we need to reset it after
so it isn't accidentally used by other tests.

Bug: chromium:547127
Test: USE="clang asan" FEATURES=test emerge-link update_engine

Change-Id: Ib84bbf265a380976407100a4fba4d2600d62dde6
/system/update_engine/image_properties.h
856166594771c61973856f563e622ccb7dd48aa1 16-Oct-2015 Alex Deymo <deymo@google.com> Read ProductId, ProductVersion and Channel setting in Brillo.

The ProductId, ProductVersion and current/target channels are specified
in a very different way in Brillo compared to Chrome OS. This patch
moves the logic to read and parse /etc/lsb-release in Chrome OS to a
new image_properties module and implements the equivalent module in
Brillo.

This new module replaces some of the logic previously in the
OmahaRequestParams class, both for parsing the read-only properties
from the rootfs and parsing and storing the target channel in the
stateful partition. The Chrome OS version of the new module keeps the
same behavior, except that it falls back to "stable-channel" if the
the current channel is missing in the rootfs (unlikely in Chrome OS).

On the other hand, the new Brillo implementation reads these settings
from the /etc/osrelease file and /etc/osrelease.d directory and doesn't
allow to override those setting during development. The persisted
target_channel and powerwash_allowed settings are stored in Prefs
as many other settings. Finally, since Brillo images don't contain
a channel name baked in the image, we store the channel name where we
got the image from at the time of the update. The first boot after
provisioning will default to "stable-channel".

Bug: 25013069
Test: unittest in Chrome OS; `mm` and tested on a Brillo device.

Change-Id: Icc114b8098af3edaaba715c9c2e3ebe9f417c876
/system/update_engine/image_properties.h