Skip to content

Commit

Permalink
Add options flag for avoiding full rebuilds
Browse files Browse the repository at this point in the history
Add an options.conf flag for allowing builds to use mock's
--short-circuit for reducing rebuild time.

This change moves the feature from default enabling with no way to
turn off to default disable with a configure to turn on.

Signed-off-by: William Douglas <william.douglas@intel.com>
  • Loading branch information
bryteise committed Jul 22, 2024
1 parent 6d73b41 commit ed97bc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion autospec/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def package(self, filemanager, mockconfig, mockopts, config, requirements, conte
mockopts,
]

if not cleanup and self.must_restart == 0 and self.file_restart > 0 and set(filemanager.excludes) == set(filemanager.manual_excludes):
if config.config_opts.get('avoid_rebuild') and not cleanup and self.must_restart == 0 and self.file_restart > 0 and set(filemanager.excludes) == set(filemanager.manual_excludes):
cmd_args.append("--no-clean")
cmd_args.append("--short-circuit=binary")

Expand Down
1 change: 1 addition & 0 deletions autospec/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def __init__(self, download_path):
}
self.config_opts = {}
self.config_options = {
"avoid_rebuild": "Try to use mock short circuit to avoid full rebuilds",
"broken_c++": "extend flags with '-std=gnu++98",
"cargo_vendor": "create vendor archive with cargo",
"use_lto": "configure build for lto",
Expand Down

0 comments on commit ed97bc8

Please sign in to comment.