Skip to content

Commit 5358efe

Browse files
committed
Allow --disable-plugin buildroot_lock with --calculate-build-dependencies
The --calculate-build-dependencies option unconditionally enabled the buildroot_lock plugin, overriding an explicit --disable-plugin. Now the plugin is only auto-enabled when the user hasn't explicitly disabled it. Fixes: #1758 Assisted-By: Claude Code (claude-opus-4-6)
1 parent 267f855 commit 5358efe

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

mock/py/mockbuild/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,8 @@ def set_config_opts_per_cmdline(config_opts, options, args):
718718

719719
config_opts["calculatedeps"] = options.calculatedeps
720720
if config_opts["calculatedeps"]:
721-
config_opts["plugin_conf"]["buildroot_lock_enable"] = True
721+
if "buildroot_lock" not in options.disabled_plugins:
722+
config_opts["plugin_conf"]["buildroot_lock_enable"] = True
722723

723724
if options.buildroot_image: # --buildroot-image option
724725
if os.path.exists(options.buildroot_image):
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
The `buildroot_lock` plugin no longer crashes when the bootstrap image is
22
unavailable. The lockfile is now only populated with bootstrap metadata when
3-
`use_bootstrap_image` is enabled ([issue#1758][]).
3+
`use_bootstrap_image` is enabled. Also, `--calculate-build-dependencies` no
4+
longer overrides an explicit `--disable-plugin buildroot_lock`
5+
([issue#1758][]).

0 commit comments

Comments
 (0)