File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -419,6 +419,12 @@ def parse_args():
419419 default = False ,
420420 help = "Don't refresh the gitrepo of each existing component, just send new components scratchbuilds and downloads srpms."
421421 )
422+ parser .add_argument (
423+ '--trust-cache' ,
424+ action = 'store_true' ,
425+ default = False ,
426+ help = "Trust cached BuildRequires data and skip builds for packages already in cache."
427+ )
422428 parser .add_argument (
423429 'packages' ,
424430 nargs = '*' ,
@@ -430,11 +436,19 @@ def parse_args():
430436if __name__ == '__main__' :
431437 args = parse_args ()
432438
439+ read_bconds_cache_if_exists ()
440+
433441 # build everything
434442 something_was_submitted = False
435443 for component_name , bcond_config in each_bcond_name_config ():
436444 if args .packages and component_name not in args .packages :
437445 continue
446+
447+ # If trusting cache and buildrequires already exists, skip build
448+ if args .trust_cache and 'buildrequires' in bcond_config :
449+ log (f'• { component_name } ({ bcond_config ["id" ]} ): Using cached BuildRequires, skipping build' )
450+ continue
451+
438452 something_was_submitted |= scratchbuild_patched_if_needed (component_name , bcond_config , no_git_refresh = args .no_git_refresh )
439453
440454 # download everything until there's nothing downloaded
You can’t perform that action at this time.
0 commit comments