cros_generate_update_payload: Don't do sudo when calling cgpt.
cros_generate_update_payload was using partoffset and partsize from
chromeos-common.sh which call sudo before running cgpt to detect the
offset and size of a partition. This is ok in the context of
chromeos-common.sh, since they are often called over a block device,
but in cros_generate_update_payload the images are regular files.
This patch stops including chromeos-common.sh and uses its own simpler
version of these functions that don't call sudo.
TEST=Ran cros_generate_update_payload as a regular user.
Trybot-Ready: Alex Deymo <firstname.lastname@example.org>
Tested-by: Alex Deymo <email@example.com>
Reviewed-by: Don Garrett <firstname.lastname@example.org>
Commit-Queue: Alex Deymo <email@example.com>
1 file changed