summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2016-12-28 11:33:29 +1100
committerZhao Wei Liew <zhaoweiliew@gmail.com>2017-01-09 01:13:20 +0000
commit8cd2bcba15c328c124b28fc12cd1b9846633d5d5 (patch)
tree9ae8ab195d09fc43c03aad16976cfd47bd89b6ed /tools
parentbb05c8fc87643e7594b53b0fc6a3217745a2b0a3 (diff)
downloadbuild-8cd2bcba15c328c124b28fc12cd1b9846633d5d5.zip
build-8cd2bcba15c328c124b28fc12cd1b9846633d5d5.tar.gz
build-8cd2bcba15c328c124b28fc12cd1b9846633d5d5.tar.bz2
build: support lineage device trees
Change-Id: I087a97e31cab2ccfba16b5378cef429785baf7d0
Diffstat (limited to 'tools')
-rwxr-xr-xtools/roomservice.py33
1 files changed, 19 insertions, 14 deletions
diff --git a/tools/roomservice.py b/tools/roomservice.py
index 5393907..691456e 100755
--- a/tools/roomservice.py
+++ b/tools/roomservice.py
@@ -203,25 +203,30 @@ def add_to_manifest(repositories, fallback_branch = None):
def fetch_dependencies(repo_path, fallback_branch = None):
print('Looking for dependencies')
- dependencies_path = repo_path + '/cm.dependencies'
+ dependencies_paths = [repo_path + '/lineage.dependencies', repo_path + '/cm.dependencies']
+ found_dependencies = False
syncable_repos = []
- if os.path.exists(dependencies_path):
- dependencies_file = open(dependencies_path, 'r')
- dependencies = json.loads(dependencies_file.read())
- fetch_list = []
+ for dependencies_path in dependencies_paths:
+ if os.path.exists(dependencies_path):
+ dependencies_file = open(dependencies_path, 'r')
+ dependencies = json.loads(dependencies_file.read())
+ fetch_list = []
- for dependency in dependencies:
- if not is_in_manifest(dependency['target_path']):
- fetch_list.append(dependency)
- syncable_repos.append(dependency['target_path'])
+ for dependency in dependencies:
+ if not is_in_manifest(dependency['target_path']):
+ fetch_list.append(dependency)
+ syncable_repos.append(dependency['target_path'])
- dependencies_file.close()
+ dependencies_file.close()
+ found_dependencies = True
- if len(fetch_list) > 0:
- print('Adding dependencies to manifest')
- add_to_manifest(fetch_list, fallback_branch)
- else:
+ if len(fetch_list) > 0:
+ print('Adding dependencies to manifest')
+ add_to_manifest(fetch_list, fallback_branch)
+ break
+
+ if not found_dependencies:
print('Dependencies file not found, bailing out.')
if len(syncable_repos) > 0: