build_packages: add a --autosetgov_sticky option
Allow users to opt-in to --autosetgov behavior all the time, even if
they forget to specify the flag.
BUG=b:187789305
TEST=Ran series of commands and checked state
# Warns about powersave, but leaves it alone.
./build_packages ...
# Automatically switches to performance.
./build_packages ... --autosetgov
# Still warns about powersave, but leaves it alone (good).
./build_packages ...
# Tells user they're opting in, and automatically switches to performance.
./build_packages ... --autosetgov --autosetgov_sticky
# Automatically switches to performance.
./build_packages ...
# Tells user they're opting out, and warns about powersave, and leaves it alone.
./build_packages ... --autosetgov_sticky
# Warns about powersave, but leaves it alone.
./build_packages ...
Change-Id: Ic80ff701225730736820e1271a0b1174e4cf253f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3417385
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Alex Klein <saklein@chromium.org>
1 file changed