3131 get_path_by_using_find
3232)
3333from .check_package_file import check_packaging_files
34- from .check_notice_file import (
35- run_notice_html_checklist ,
34+ from .check_notice_file import (
3635 find_bin_in_notice ,
37- read_notice_file ,
38- create_additional_notice ,
39- divide_notice_files_by_binary
36+ read_notice_file
4037)
4138from ._binary_db_controller import get_oss_info_from_db
4239from ._common import (
7269platform_version = "" # Android Version. ex- 7.0.0.r1 -> 7.0
7370
7471# Define Const Variables
75- NOTICE_HTML_FILE_NAME = ""
7672ANDROID_LOG_FILE_NAME = "android.log"
7773num_cores = 1
7874now = ""
@@ -343,7 +339,7 @@ def find_notice_value(notice_zip_dest_file=""):
343339 notice_file_comment = "Notice file not found."
344340
345341 try :
346- notice_file_list , notice_files = read_notice_file (os .path .abspath (build_out_notice_file_path ), NOTICE_HTML_FILE_NAME )
342+ notice_file_list , notice_files = read_notice_file (os .path .abspath (build_out_notice_file_path ))
347343 if notice_file_list :
348344 if notice_files :
349345 for notice_file in notice_files :
@@ -794,13 +790,11 @@ def create_and_copy_notice_zip(notice_files_list, zip_file_path):
794790
795791
796792def main ():
797- global android_log_lines , ANDROID_LOG_FILE_NAME , NOTICE_HTML_FILE_NAME , python_script_dir , num_cores , now , logger , final_bin_info
798- find_empty_path = False
799- _create_additial_notice = False
793+ global android_log_lines , ANDROID_LOG_FILE_NAME , python_script_dir , num_cores , now , logger , final_bin_info
794+ find_empty_path = False
800795 notice_check_ok = False
801796 base_binary_txt = ""
802- auto_fill_oss_name = True
803- _NOTICE_CHECKLIST_TYPE = False
797+ auto_fill_oss_name = True
804798 analyze_source = False
805799 path_to_exclude = []
806800 RESULT_FILE_EXTENSION = ".xlsx"
@@ -820,17 +814,12 @@ def main():
820814 parser = argparse .ArgumentParser (description = 'FOSSLight Android' , prog = 'fosslight_android' , add_help = False )
821815 parser .add_argument ('-h' , '--help' , action = 'store_true' , required = False )
822816 parser .add_argument ('-v' , '--version' , action = 'store_true' , required = False )
823- parser .add_argument ('-s' , '--source' , type = str , required = False )
824- parser .add_argument ('-b' , '--binary' , type = str , required = False )
825- parser .add_argument ('-n' , '--notice' , type = str , required = False )
826- parser .add_argument ('-t' , '--toadd' , action = 'store_true' , required = False )
827- parser .add_argument ('-m' , '--more' , action = 'store_true' , required = False )
828- parser .add_argument ('-c' , '--check' , type = str , required = False )
817+ parser .add_argument ('-s' , '--source' , type = str , required = False )
818+ parser .add_argument ('-m' , '--more' , action = 'store_true' , required = False )
829819 parser .add_argument ('-a' , '--android' , type = str , required = False )
830820 parser .add_argument ('-f' , '--find' , action = 'store_true' , required = False )
831821 parser .add_argument ('-i' , '--ignore' , action = 'store_true' , required = False )
832- parser .add_argument ('-p' , '--packaging' , type = str , required = False )
833- parser .add_argument ('-d' , '--divide' , type = str , required = False )
822+ parser .add_argument ('-p' , '--packaging' , type = str , required = False )
834823 parser .add_argument ('-r' , '--remove' , type = str , required = False )
835824 parser .add_argument ('-e' , '--exclude' , nargs = "*" , required = False , default = [])
836825
@@ -842,17 +831,10 @@ def main():
842831 if args .source : # android source path
843832 os .chdir (args .source )
844833 android_src_path = args .source
845- if args .binary : # Base model's binary.txt to exclude
846- base_binary_txt = args .binary
847- if args .notice :
848- NOTICE_HTML_FILE_NAME = args .notice
849- if args .toadd : # Create needtoadd-notice.html file.
850- _create_additial_notice = True
834+
851835 if args .more : # Analyze source mode.
852836 analyze_source = True
853- if args .check :
854- _NOTICE_CHECKLIST_TYPE = True
855- notice_check_ok = (args .check == "ok" or args .check == "OK" )
837+
856838 if args .android :
857839 ANDROID_LOG_FILE_NAME = args .android
858840 if args .find : # Execute "find" command when source path is not found.
@@ -867,15 +849,9 @@ def main():
867849 if args .packaging :
868850 check_packaging_files (args .packaging )
869851 return
870- if args .divide :
871- divide_notice_files_by_binary (args .divide , python_script_dir , now )
872- return
852+
873853 if args .remove : # Remove the inputted list from the binary list.
874- remove_list_file = args .remove
875-
876- if _NOTICE_CHECKLIST_TYPE :
877- run_notice_html_checklist (base_binary_txt , notice_check_ok , NOTICE_HTML_FILE_NAME )
878- return
854+ remove_list_file = args .remove
879855
880856 read_success , android_log_lines = read_file (ANDROID_LOG_FILE_NAME )
881857 if not read_success :
@@ -912,10 +888,7 @@ def main():
912888 if not success :
913889 logger .warning (f"Failed to write result to excel:{ msg } " )
914890 result_log ["Output FOSSLight Report" ] = f"{ result_file } "
915-
916- if _create_additial_notice :
917- create_additional_notice (final_bin_info , python_script_dir )
918-
891+
919892 # Print the result
920893 result_log ["Output Directory" ] = python_script_dir
921894 try :
0 commit comments