summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gernoth <michael@gernoth.net>2017-03-26 14:33:05 +0200
committerMichael Gernoth <michael@gernoth.net>2017-03-29 21:36:02 +0200
commit0384560c9220a5c21f37b1f509504dbd5362324d (patch)
tree3e645ab30bfd69038c2fca798817642574ac0427
parent1b76af7afda69dd04f276fb45c5bf637fefd89d4 (diff)
downloadbuild-0384560c9220a5c21f37b1f509504dbd5362324d.zip
build-0384560c9220a5c21f37b1f509504dbd5362324d.tar.gz
build-0384560c9220a5c21f37b1f509504dbd5362324d.tar.bz2
roomservice: handle devices with underscores
This change correctly handles devices with underscores in their name even if there is a device with the same name after the last underscore (spyder, umts_spyder) by not allowing any underscores in the manufacturers name. Without this change, spyder gets resolved to: device/motorola_umts/spyder device/motorola/spyder Only the last one is valid. With this change, both spyder and umts_spyder get resolved correctly. Change-Id: I0c95ff126d827a2d6b58875dfcb9327e999f4913
-rwxr-xr-xtools/roomservice.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/roomservice.py b/tools/roomservice.py
index 691456e..da8fa93 100755
--- a/tools/roomservice.py
+++ b/tools/roomservice.py
@@ -251,7 +251,7 @@ if depsonly:
else:
for repository in repositories:
repo_name = repository['name']
- if repo_name.startswith("android_device_") and repo_name.endswith("_" + device):
+ if re.match(r"^android_device_[^_]*_" + device + "$", repo_name):
print("Found repository: %s" % repository['name'])
manufacturer = repo_name.replace("android_device_", "").replace("_" + device, "")