@@ -99,6 +99,8 @@ def __init__(self, args) -> None:
9999 self .reorder = args .reorder
100100 self .save_list = args .save_list
101101 self .force_use_apt = args .force_use_apt
102+ self .generate_pkg_metadata = args .generate_pkg_metadata
103+
102104 # static vars
103105 self .autobuild_conf_dir = AUTOBUILD_CONF_DIR
104106 self .conf_dir = CONF_DIR
@@ -302,7 +304,7 @@ def build_sequential(self, build_timings, packages: List[ACBSPackageInfo]):
302304 source_name = task .name
303305 if task .base_slug :
304306 source_name = os .path .basename (task .base_slug )
305- if not has_stamp (task .build_location ):
307+ if not has_stamp (task .build_location ) and not self . generate_pkg_metadata :
306308 fetch_source (task .source_uri , self .dump_dir , source_name )
307309 if self .dl_only :
308310 if self .generate :
@@ -317,11 +319,13 @@ def build_sequential(self, build_timings, packages: List[ACBSPackageInfo]):
317319 if not task .build_location :
318320 build_dir = make_build_dir (self .tmp_dir )
319321 task .build_location = build_dir
320- process_source (task , source_name )
322+ if not self .generate_pkg_metadata :
323+ process_source (task , source_name )
321324 else :
322325 # First sub-package in a meta-package
323326 if not has_stamp (task .build_location ):
324- process_source (task , source_name )
327+ if not self .generate_pkg_metadata :
328+ process_source (task , source_name )
325329 Path (os .path .join (task .build_location , '.acbs-stamp' )).touch ()
326330 build_dir = task .build_location
327331 if task .subdir :
@@ -332,23 +336,25 @@ def build_sequential(self, build_timings, packages: List[ACBSPackageInfo]):
332336 raise RuntimeError (
333337 'Could not determine sub-directory, please specify manually.' )
334338 build_dir = os .path .join (build_dir , subdir )
335- if task .installables :
339+ if task .installables and not self . generate_pkg_metadata :
336340 logging .info ('Installing dependencies from repository...' )
337341 install_from_repo (task .installables , self .force_use_apt )
338342 start = time .monotonic ()
339343 task_name = f'{ task .name } ({ task .bin_arch } @ { task .epoch + ":" if task .epoch else "" } { task .version } -{ task .rel } )'
340344 try :
341345 scoped_stage2 = ACBSPackageInfo .is_in_stage2 (task .modifiers ) | self .stage2
342- invoke_autobuild (task , build_dir , scoped_stage2 )
343- check_artifact (task .name , build_dir )
346+ invoke_autobuild (task , build_dir , scoped_stage2 , self .generate_pkg_metadata )
347+ if not self .generate_pkg_metadata :
348+ check_artifact (task .name , build_dir )
344349 except Exception :
345350 # early printing of build summary before exploding
346351 print_build_timings (build_timings , packages [idx :], time .monotonic () - start )
347352 raise RuntimeError (
348353 f'Build directory of the failed package: { build_dir } ' )
349- build_timings .append ((task_name , time .monotonic () - start ))
350- ciel_invalidate_cache ()
351- ciel_wait_for_refresh ()
354+ if not self .generate_pkg_metadata :
355+ build_timings .append ((task_name , time .monotonic () - start ))
356+ ciel_invalidate_cache ()
357+ ciel_wait_for_refresh ()
352358
353359 def acbs_except_hdr (self , type_ , value , tb ):
354360 logging .debug ('Traceback:\n ' + '' .join (traceback .format_tb (tb )))
0 commit comments