Rework the devserver help to make it much easier to use.
After debugging and working with others to debug their issues with the
devserver, it has become clear that the devserver help is awful. This CL
does a much needed touch up on the devserver help message. Now you get
a full doc with options grouped based on who should use them. For the most part
most people should only ever need data_dir, port, and -t. Please take a look
over both the main docstring and which group I put each option in and let
me know if you disagree.
I also started the work in deprecating for_vm and replacing it with
no_patch_kernel.
BUG=chromium:225129
TEST=--help and also ran with every combination of --for_vm and
--no_patch_kernel.
Change-Id: Ic8d2c8519e7c9d4737a8e24ae44cbfe5f9ee1c84
Reviewed-on: https://gerrit.chromium.org/gerrit/46937
Tested-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 1f71ef4..0e0b49c 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -127,7 +127,7 @@
src_image: if specified, creates a delta payload from this image.
proxy_port: port of local proxy to tell client to connect to you
through.
- vm: set for VM images (doesn't patch kernel)
+ patch_kernel: Patch the kernel when generating updates
board: board for the image. Needed for pre-generating of updates.
copy_to_static_root: copies images generated from the cache to ~/static.
private_key: path to private key in PEM format.
@@ -147,7 +147,7 @@
def __init__(self, serve_only=None, test_image=False, urlbase=None,
forced_image=None, payload_path=None,
- proxy_port=None, src_image='', vm=False, board=None,
+ proxy_port=None, src_image='', patch_kernel=True, board=None,
copy_to_static_root=True, private_key=None,
critical_update=False, remote_payload=False, max_updates= -1,
host_log=False, *args, **kwargs):
@@ -163,7 +163,7 @@
self.payload_path = payload_path
self.src_image = src_image
self.proxy_port = proxy_port
- self.vm = vm
+ self.patch_kernel = patch_kernel
self.board = board
self.copy_to_static_root = copy_to_static_root
self.private_key = private_key
@@ -310,7 +310,7 @@
if src_image:
update_command.extend(['--src_image', src_image])
- if not self.vm:
+ if self.patch_kernel:
update_command.append('--patch_kernel')
if self.private_key:
@@ -360,7 +360,7 @@
if self.private_key:
update_dir += '+' + common_util.GetFileMd5(self.private_key)
- if not self.vm:
+ if self.patch_kernel:
update_dir += '+patched_kernel'
return os.path.join(CACHE_DIR, update_dir)