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 <email@example.com>
Tested-by: Alex Deymo <firstname.lastname@example.org>
Reviewed-by: Don Garrett <email@example.com>
Commit-Queue: Alex Deymo <firstname.lastname@example.org>
1 file changed