Deprecate serve_only for archive_dir.

Also change when the devserver will attempt to generate a payload, and
when it will attempt to generate a payload from the latest local build.

Previously, generation was attempted when no --image or --payload was
specified, and if archive_dir's serve_only mode was off.

Since serve_only is gone, we now just check that we're within chroot
before attempting to generate a payload.

Before attempting to generate a payload from the most recent local
build, we check that the directory specified by the label (if provided)
doesn't contain an update file.

BUG=chromium:261775
TEST=unittests updated
cbuildbot --remote mario-paladin

Change-Id: If094db197005836d9fcad5fb63ffcb8470be3706
Reviewed-on: https://gerrit.chromium.org/gerrit/63363
Reviewed-by: Chris Sosa <sosa@chromium.org>
Reviewed-by: Joy Chen <joychen@chromium.org>
Tested-by: Joy Chen <joychen@chromium.org>
Commit-Queue: Joy Chen <joychen@chromium.org>
diff --git a/xbuddy.py b/xbuddy.py
index 1bd4b6d..3e7c54b 100644
--- a/xbuddy.py
+++ b/xbuddy.py
@@ -40,7 +40,7 @@
   devserver_constants.TEST_IMAGE_FILE,
   devserver_constants.BASE_IMAGE_FILE,
   devserver_constants.IMAGE_FILE,
-  devserver_constants.ROOT_UPDATE_FILE,
+  devserver_constants.UPDATE_FILE,
 ]
 
 LOCAL_ALIAS_TO_FILENAME = dict(zip(LOCAL_ALIASES, LOCAL_FILE_NAMES))
@@ -63,7 +63,7 @@
   devserver_constants.TEST_IMAGE_FILE,
   devserver_constants.BASE_IMAGE_FILE,
   devserver_constants.RECOVERY_IMAGE_FILE,
-  devserver_constants.ROOT_UPDATE_FILE,
+  devserver_constants.UPDATE_FILE,
   build_artifact.STATEFUL_UPDATE_FILE,
   devserver_constants.AUTOTEST_DIR,
 ]
@@ -530,6 +530,13 @@
     Equivalent to the Get call, minus downloading and updating timestamps.
     The returned path is always the path to the directory.
 
+    Returns:
+      build_id - Path to the image or update directory on the devserver.
+      e.g. x86-generic/R26-4000.0.0/chromium-test-image.bin
+      or x86-generic/R26-4000.0.0/
+
+      found - Whether or not the given artifact is currently cached.
+
     Throws:
       XBuddyException - if the path couldn't be translated
     """
@@ -550,10 +557,8 @@
 
     Returns:
       Path to the image or update directory on the devserver.
-      e.g. http://host/static/x86-generic/
-      R26-4000.0.0/chromium-test-image.bin
-      or
-      http://host/static/x86-generic/R26-4000.0.0/
+      e.g. x86-generic/R26-4000.0.0/chromium-test-image.bin
+      or x86-generic/R26-4000.0.0/
 
     Raises:
       XBuddyException if path is invalid