Use full paths to remote payloads.
Currently we assume --payload points to a directory with an update.gz.
This CL eliminates that assumption while retaining some temporary
backwards compatability (anything that will use it will end with *.bin
for now).
BUG=chromium:272563
TEST=Unittest + ran with new AU E2E test.
Change-Id: I81d258cb68fb1ee39c841c2e356fd9151784ad2a
Reviewed-on: https://gerrit.chromium.org/gerrit/65789
Commit-Queue: Chris Sosa <sosa@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index 4eac41e..2e4bb6a 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -723,9 +723,11 @@
if not label:
label = self.payload_path
- # Form the URL of the update payload. This assumes that the payload
- # file name is a devserver constant (which currently is the case).
- url = _NonePathJoin(static_urlbase, label, constants.UPDATE_FILE)
+ # TODO(sosa): Remove backwards-compatible hack.
+ if not label.endswith('.bin'):
+ url = _NonePathJoin(static_urlbase, label, 'update.gz')
+ else:
+ url = _NonePathJoin(static_urlbase, label)
# Get remote payload attributes.
metadata_obj = self._GetRemotePayloadAttrs(url)