4
4
import sys
5
5
from .OEClass import OE
6
6
7
+ script_version = "v1.0.15"
7
8
8
9
class Config :
9
10
def __init__ (self ):
@@ -80,7 +81,7 @@ def __init__(self):
80
81
"from OE data are scanned by default)" ,
81
82
action = 'store_true' )
82
83
parser .add_argument ("--detect_jar_path" , help = "OPTIONAL Synopsys Detect jar path" , default = "" )
83
- parser .add_argument ("--detect_opts" , help = "OPTIONAL Additional Synopsys Detect options" , default = "" )
84
+ parser .add_argument ("--detect_opts" , help = "OPTIONAL Additional Synopsys Detect options (remove leading '--') " , default = "" )
84
85
parser .add_argument ("--api_timeout" , help = "OPTIONAL API and Detect timeout in seconds (default 60)" ,
85
86
default = "60" )
86
87
parser .add_argument ("--sbom_create_custom_components" ,
@@ -122,7 +123,7 @@ def __init__(self):
122
123
self .skip_sig_scan = False
123
124
self .scan_all_packages = False
124
125
self .detect_jar = ''
125
- self .detect_opts = args . detect_opts
126
+ self .detect_opts = ''
126
127
self .api_timeout = args .api_timeout
127
128
self .sbom_custom_components = args .sbom_create_custom_components
128
129
self .cve_check_dir = ''
@@ -144,7 +145,7 @@ def __init__(self):
144
145
else :
145
146
logging .basicConfig (level = loglevel )
146
147
147
- logging .info ("Black Duck Yocto scan via SBOM utility - v1.0.14 " )
148
+ logging .info (f "Black Duck Yocto scan via SBOM utility - { script_version } " )
148
149
logging .info ("SUPPLIED ARGUMENTS:" )
149
150
for arg in vars (args ):
150
151
logging .info (f"--{ arg } ={ getattr (args , arg )} " )
@@ -213,9 +214,9 @@ def __init__(self):
213
214
214
215
if args .target :
215
216
self .target = args .target
216
- elif not self .license_manifest :
217
- logging .error (f"Target --target required if --license_manifest not specified" )
218
- terminate = True
217
+ # elif not self.license_manifest:
218
+ # logging.error(f"Target --target required if --license_manifest not specified")
219
+ # terminate = True
219
220
220
221
if args .bitbake_layers_file :
221
222
if not os .path .exists (args .bitbake_layers_file ):
@@ -286,6 +287,9 @@ def __init__(self):
286
287
else :
287
288
self .recipe_report = args .recipe_report
288
289
290
+ if args .detect_opts != '' :
291
+ self .detect_opts = args .detect_opts .replace ('detect' , '--detect' )
292
+
289
293
if terminate :
290
294
sys .exit (2 )
291
295
return
0 commit comments