roomservice: Read all local manifests
Change-Id: Idfe6330ff82b9e4c0d11cb0320defa7bf44121f5
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import base64
|
import base64
|
||||||
|
import glob
|
||||||
import json
|
import json
|
||||||
import netrc
|
import netrc
|
||||||
import os
|
import os
|
||||||
@@ -129,28 +130,30 @@ def get_default_revision():
|
|||||||
return r.replace('refs/heads/', '').replace('refs/tags/', '')
|
return r.replace('refs/heads/', '').replace('refs/tags/', '')
|
||||||
|
|
||||||
def get_from_manifest(devicename):
|
def get_from_manifest(devicename):
|
||||||
try:
|
for path in glob.glob(".repo/local_manifests/*.xml"):
|
||||||
lm = ElementTree.parse(".repo/local_manifests/roomservice.xml")
|
try:
|
||||||
lm = lm.getroot()
|
lm = ElementTree.parse(path)
|
||||||
except:
|
lm = lm.getroot()
|
||||||
lm = ElementTree.Element("manifest")
|
except:
|
||||||
|
lm = ElementTree.Element("manifest")
|
||||||
|
|
||||||
for localpath in lm.findall("project"):
|
for localpath in lm.findall("project"):
|
||||||
if re.search("android_device_.*_%s$" % device, localpath.get("name")):
|
if re.search("android_device_.*_%s$" % device, localpath.get("name")):
|
||||||
return localpath.get("path")
|
return localpath.get("path")
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def is_in_manifest(projectpath):
|
def is_in_manifest(projectpath):
|
||||||
try:
|
for path in glob.glob(".repo/local_manifests/*.xml"):
|
||||||
lm = ElementTree.parse(".repo/local_manifests/roomservice.xml")
|
try:
|
||||||
lm = lm.getroot()
|
lm = ElementTree.parse(path)
|
||||||
except:
|
lm = lm.getroot()
|
||||||
lm = ElementTree.Element("manifest")
|
except:
|
||||||
|
lm = ElementTree.Element("manifest")
|
||||||
|
|
||||||
for localpath in lm.findall("project"):
|
for localpath in lm.findall("project"):
|
||||||
if localpath.get("path") == projectpath:
|
if localpath.get("path") == projectpath:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Search in main manifest, too
|
# Search in main manifest, too
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user