upload_prebuilts: Look in all relevant overlays for GS acl file.
We currently only look in the primary overlay for the Google Storage ACL file.
This means that any project that wants a builder (and hence a hidden GS ACL
file) is forced to have a private overlay.
We may now have projects that share a common master overlay that contains this
ACL file. After this CL, we search for this file in all the stacked overlays.
BUG=chromium:424325
TEST=unittests.
Change-Id: I14ae3744bc7bcb9e418e1b5230ffaae94ee2ddf1
Reviewed-on: https://chromium-review.googlesource.com/223853
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/scripts/upload_prebuilts.py b/scripts/upload_prebuilts.py
index 9cfac63..4a2180a 100644
--- a/scripts/upload_prebuilts.py
+++ b/scripts/upload_prebuilts.py
@@ -798,8 +798,9 @@
if options.private:
binhost_base_url = options.upload
if target:
- board_path = GetBoardOverlay(options.build_path, target)
- acl = os.path.join(board_path, _GOOGLESTORAGE_GSUTIL_FILE)
+ acl = portage_util.FindOverlayFile(_GOOGLESTORAGE_GSUTIL_FILE,
+ board=target.board_variant,
+ buildroot=options.build_path)
uploader = PrebuiltUploader(options.upload, acl, binhost_base_url,
pkg_indexes, options.build_path,