@@ -178,7 +178,7 @@ def main(args=None, logfile=None, do_build=None, testing=False):
178
178
179
179
# initialise logging for main
180
180
global _log
181
- _log , logfile = init_logging (logfile , logtostdout = options .logtostdout , silent = testing or options .last_log )
181
+ _log , logfile = init_logging (logfile , logtostdout = options .logtostdout , silent = testing or options .terse )
182
182
183
183
# disallow running EasyBuild as root
184
184
if os .getuid () == 0 :
@@ -223,22 +223,13 @@ def main(args=None, logfile=None, do_build=None, testing=False):
223
223
# print location to last log file, and exit
224
224
last_log = find_last_log (logfile ) or '(none)'
225
225
print_msg (last_log , log = _log , prefix = False )
226
- cleanup (logfile , eb_tmpdir , testing , silent = True )
227
- sys .exit (0 )
228
226
229
227
# check whether packaging is supported when it's being used
230
228
if options .package :
231
229
check_pkg_support ()
232
230
else :
233
231
_log .debug ("Packaging not enabled, so not checking for packaging support." )
234
232
235
- # update session state
236
- eb_config = eb_go .generate_cmd_line (add_default = True )
237
- modlist = session_module_list (testing = testing ) # build options must be initialized first before 'module list' works
238
- init_session_state .update ({'easybuild_configuration' : eb_config })
239
- init_session_state .update ({'module_list' : modlist })
240
- _log .debug ("Initial session state: %s" % init_session_state )
241
-
242
233
# GitHub integration
243
234
if options .review_pr or options .new_pr or options .update_pr :
244
235
if options .review_pr :
@@ -254,18 +245,31 @@ def main(args=None, logfile=None, do_build=None, testing=False):
254
245
sys .exit (0 )
255
246
256
247
# search for easyconfigs, if a query is specified
257
- query = options .search or options .search_short
248
+ query = options .search or options .search_filename or options . search_short
258
249
if query :
259
- search_easyconfigs (query , short = not options .search )
250
+ search_easyconfigs (query , short = options .search_short , filename_only = options .search_filename ,
251
+ terse = options .terse )
252
+
253
+ # non-verbose cleanup and exit after printing terse info
254
+ if options .terse :
255
+ cleanup (logfile , eb_tmpdir , testing , silent = True )
256
+ sys .exit (0 )
257
+
258
+ # update session state
259
+ eb_config = eb_go .generate_cmd_line (add_default = True )
260
+ modlist = session_module_list (testing = testing ) # build options must be initialized first before 'module list' works
261
+ init_session_state .update ({'easybuild_configuration' : eb_config })
262
+ init_session_state .update ({'module_list' : modlist })
263
+ _log .debug ("Initial session state: %s" % init_session_state )
260
264
261
265
# determine easybuild-easyconfigs package install path
262
266
easyconfigs_pkg_paths = get_paths_for (subdir = EASYCONFIGS_PKG_SUBDIR )
263
267
if not easyconfigs_pkg_paths :
264
268
_log .warning ("Failed to determine install path for easybuild-easyconfigs package." )
265
269
266
270
# command line options that do not require any easyconfigs to be specified
267
- no_ec_opts = [options .aggregate_regtest , options .new_pr , options .review_pr , options .search , options . search_short ,
268
- options .regtest , options .update_pr ]
271
+ no_ec_opts = [options .aggregate_regtest , options .new_pr , options .review_pr , options .search ,
272
+ options .search_filename , options . search_short , options . regtest , options .update_pr ]
269
273
270
274
# determine paths to easyconfigs
271
275
paths = det_easyconfig_paths (orig_paths )
0 commit comments