Merge "Revert "generate_notice.py: don't check for strings we don't use any more."" into main am: afd4f41337 am: e8eda8ae02 am: 18a1e9b231

Original change: https://android-review.googlesource.com/c/platform/bionic/+/2864425

Change-Id: I75c8c2babdd6e5ad4d8d4f2e3c35b13ff080396a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Bob Yang 2023-12-07 10:02:03 +00:00 committed by Automerger Merge Worker
commit 36b41c333d

View file

@ -45,6 +45,14 @@ def is_interesting(path_str: str) -> bool:
return True
def is_auto_generated(content):
if "Generated by gensyscalls.py" in content or "generated by genserv.py" in content:
return True
if "This header was automatically generated from a Linux kernel header" in content:
return True
return False
def is_copyright_end(line: str, first_line_was_hash: bool) -> bool:
endings = [
" $FreeBSD: ",
@ -145,6 +153,10 @@ def do_file(path: str) -> None:
warn_verbose("ignoring short file %s" % path)
return
if is_auto_generated(content):
warn_verbose("ignoring auto-generated file %s" % path)
return
if not "Copyright" in content:
if "public domain" in content.lower():
warn_verbose("ignoring public domain file %s" % path)