Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7431dac6 authored by Doug Zongker's avatar Doug Zongker
Browse files

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
parent 7e2f13b4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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:
    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)
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ def hashname(str):
for name, t in sorted(by_tagname.iteritems()):
  if t.tagnum is None:
    while True:
      x = (hashname(name) % (ASSIGN_LIMIT - ASSIGN_START)) + ASSIGN_START
      x = (hashname(name) % (ASSIGN_LIMIT - ASSIGN_START - 1)) + ASSIGN_START
      if x not in by_tagnum:
        t.tagnum = x
        by_tagnum[x] = t