diff options
author | Spandan Das <spandandas@google.com> | 2022-11-01 20:38:19 +0000 |
---|---|---|
committer | Spandan Das <spandandas@google.com> | 2022-11-01 22:51:17 +0000 |
commit | 5f92379678dca2eee7d3986ef13cf17351035bc7 (patch) | |
tree | 8335c8c19063f5df03d069d54a44b0060fbd2e25 | |
parent | 9e183d062f43193bd1c91d38fe8bd86dd7abefad (diff) | |
download | orchestrator-5f92379678dca2eee7d3986ef13cf17351035bc7.tar.gz |
Always mount api_surfaces dir
Currenlty, the workflow for api_surfaces dir is
1. Generated in Step 2b (API surface assembly)
2. Mounted in Step 3a (API domain analysis)
This means that for clean builds (empty out/), API domains will not
build against Android.bp files generated by the build orhcestrator,
since out/api_surfaces is not mounted if it is does not exist.
Test: rm -rf out && multitree_build vendor/nothing
(Confirmed that a ninja path exists between vendor/vendorimage and libc
provided by build orchestrator)
Change-Id: Ief3fc6eb52fafd5cba2476613f61d714b3f5d0d2
-rw-r--r-- | core/inner_tree.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/core/inner_tree.py b/core/inner_tree.py index 81cf7db..c9eb202 100644 --- a/core/inner_tree.py +++ b/core/inner_tree.py @@ -90,6 +90,7 @@ class InnerTreeKey(object): class InnerTree(object): + def __init__(self, context, paths, product, variant): """Initialize with the inner tree root (relative to the workspace root)""" if not isinstance(paths, list): @@ -161,13 +162,14 @@ class InnerTree(object): # platform/apisurfaces, and be mandatory. api_surfaces = self.context.out.api_surfaces_dir( base=self.context.out.Base.ORIGIN, abspath=True) - if os.path.isdir(api_surfaces): - config.add_mountpt(src=api_surfaces, - dst=os.path.join(inner_tree_src_path, - "platform", "api_surfaces"), - is_bind=True, - rw=False, - mandatory=False) + # Always mount api_surfaces dir. + os.makedirs(api_surfaces, exist_ok=True) + config.add_mountpt(src=api_surfaces, + dst=os.path.join(inner_tree_src_path, "platform", + "api_surfaces"), + is_bind=True, + rw=False, + mandatory=False) def _meld_git(shared, src): dst = os.path.join(self.root, src[len(shared) + 1:]) @@ -261,6 +263,7 @@ class InnerTree(object): class InnerTrees(object): + def __init__(self, trees, domains): self.trees = trees self.domains = domains |