aboutsummaryrefslogtreecommitdiff
path: root/tools/java-event-log-tags.py
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2010-02-17 09:07:55 -0800
committerDoug Zongker <dougz@android.com>2010-02-17 09:07:55 -0800
commit7431dac6079a1e32a1a01efefa432014fd56145c (patch)
treeff50863933fa4f05093b883e72f8ec1e0df90ced /tools/java-event-log-tags.py
parent7e2f13b43a4a80f0739913368d4f21616caa33db (diff)
allow java eventlogtags to be generated for packages that aren't included
If there are packages that specify logtags being built that aren't included in the product, their logtags won't be included in the merged file. Assign an arbitrary tag number to them so they can be built anyway. Change-Id: I4929016bf289b7a814b48bc51f324c09f500fab1
Diffstat (limited to 'tools/java-event-log-tags.py')
-rwxr-xr-xtools/java-event-log-tags.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/java-event-log-tags.py b/tools/java-event-log-tags.py
index 552021ec3b..c63fa20775 100755
--- a/tools/java-event-log-tags.py
+++ b/tools/java-event-log-tags.py
@@ -66,7 +66,14 @@ merged_tagfile = event_log_tags.TagFile(merged_fn)
merged_by_name = dict([(t.tagname, t) for t in merged_tagfile.tags])
for t in tagfile.tags:
if t.tagnum is None:
- t.tagnum = merged_by_name[t.tagname].tagnum
+ if t.tagname in merged_by_name:
+ t.tagnum = merged_by_name[t.tagname].tagnum
+ else:
+ # We're building something that's not being included in the
+ # product, so its tags don't appear in the merged file. Assign
+ # them all an arbitrary number so we can emit the java and
+ # compile the (unused) package.
+ t.tagnum = 999999
if "java_package" not in tagfile.options:
tagfile.AddError("java_package option not specified", linenum=0)