Pregenerate bugfix.
Missing a call to xbuddy.Get. Broke trying to pregenerate an update
payload to a remotely downloaded image.
BUG=chromium:260491
TEST=manual
start_devserver --image=xbuddy:remote/parrot/latest --pregenerate_update
TEST=update a unittest
Change-Id: I17da3bac6eb60efda0c05738b95e3ea2dcdc7eb9
Reviewed-on: https://gerrit.chromium.org/gerrit/66529
Reviewed-by: Joy Chen <joychen@chromium.org>
Tested-by: Joy Chen <joychen@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Joy Chen <joychen@chromium.org>
diff --git a/autoupdate.py b/autoupdate.py
index e3181ba..1ca2307 100644
--- a/autoupdate.py
+++ b/autoupdate.py
@@ -656,9 +656,11 @@
elif self.forced_image:
if self.forced_image.startswith('xbuddy:'):
# This is trying to use an xbuddy path in place of a path to an image.
- # Pretend to have called update with this update path to payload.
xbuddy_label = self.forced_image.split(':')[1]
self.forced_image = None
+ # Make sure the xbuddy path target is in the directory.
+ path_to_payload, _image_name = self.xbuddy.Get(xbuddy_label.split('/'))
+ # Pretend to have called update with this update path to payload.
return self.GetPathToPayload(xbuddy_label, client_version, board)
src_path = os.path.abspath(self.forced_image)