lineage: Complete the rebrand
* TODO: Rebrand cmsdk when it's in a working state Change-Id: I0d8d573f9e0032110ae3a0f54ebe11a877b83137
This commit is contained in:
committed by
Michael Bestas
parent
91f7620c4d
commit
5c60e4fd24
@@ -153,7 +153,7 @@ def is_in_manifest(projectpath):
|
||||
|
||||
# ... and don't forget the lineage snippet
|
||||
try:
|
||||
lm = ElementTree.parse(".repo/manifests/snippets/cm.xml")
|
||||
lm = ElementTree.parse(".repo/manifests/snippets/lineage.xml")
|
||||
lm = lm.getroot()
|
||||
except:
|
||||
lm = ElementTree.Element("manifest")
|
||||
@@ -203,34 +203,29 @@ def add_to_manifest(repositories, fallback_branch = None):
|
||||
|
||||
def fetch_dependencies(repo_path, fallback_branch = None):
|
||||
print('Looking for dependencies in %s' % repo_path)
|
||||
dependencies_paths = [repo_path + '/lineage.dependencies', repo_path + '/cm.dependencies']
|
||||
found_dependencies = False
|
||||
dependencies_path = repo_path + '/lineage.dependencies'
|
||||
syncable_repos = []
|
||||
verify_repos = []
|
||||
|
||||
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 = []
|
||||
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'])
|
||||
verify_repos.append(dependency['target_path'])
|
||||
elif re.search("android_device_.*_.*$", dependency['repository']):
|
||||
verify_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'])
|
||||
verify_repos.append(dependency['target_path'])
|
||||
elif re.search("android_device_.*_.*$", dependency['repository']):
|
||||
verify_repos.append(dependency['target_path'])
|
||||
|
||||
dependencies_file.close()
|
||||
found_dependencies = True
|
||||
dependencies_file.close()
|
||||
|
||||
if len(fetch_list) > 0:
|
||||
print('Adding dependencies to manifest')
|
||||
add_to_manifest(fetch_list, fallback_branch)
|
||||
break
|
||||
|
||||
if not found_dependencies:
|
||||
if len(fetch_list) > 0:
|
||||
print('Adding dependencies to manifest')
|
||||
add_to_manifest(fetch_list, fallback_branch)
|
||||
else:
|
||||
print('Dependencies file not found, bailing out.')
|
||||
|
||||
if len(syncable_repos) > 0:
|
||||
|
Reference in New Issue
Block a user