darktable-org / darktable-org/lua-scripts
"disable scripts" in script manager needs update for 5.6
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 219
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
Description
The disable scripts button in the scripts module renames <config_dir>/luarc to luarc.disabled (the disable_scripts button callback in tools/script_manager.lua). This worked before the scripts were bundled, when darktable used <config_dir>/luarc as the Lua entry point.
Since 5.6, darktable loads the bundled luarc, which calls require "tools/script_manager" regardless of config_dir/luarc existing or not. Renaming config_dir/luarc no longer disables the scripts. It only prevents the user's own config_dir/luarc from being re-run. The bundled scripts still load and start.
Steps to reproduce
use darktable 5.6 with bundled scripts.
scripts module / action: install/update scripts / enable "disable scripts" button / click disable scripts.
observe luarc being renamed in the config dir
Restart darktable.
Expected: the Lua scripts are disabled.
Observed: bundled scripts still load and run.
Possible fixes
The current way to disable the scripts is the disable Lua scripts preference.
a) have the button toggle the disable_scripts preference (with the checkbox as the re-enable path)
b) remove the button in favour of the preference
I'd favour the latter - then enabling/disabling lua scripts is reduced to the preferences.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in tools/script_manager.lua at the disable_scripts button callback, then inspect the disable Lua scripts preference and the bundled luarc loading path in darktable 5.6. Reproduce the behavior with bundled scripts enabled and determine whether the button should be removed or toggle the preference. Done means disabling scripts through the scripts module actually prevents the bundled scripts from loading, with the re-enable path still clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100