packaging: Just depend on ruby instead of ruby3.1

- Let debian bookworm and trixie both work.
- Other distros are using ruby.
This commit is contained in:
Andrew Hamilton 2025-07-11 23:03:17 +10:00
parent 327852af40
commit 699f808951
2 changed files with 6 additions and 7 deletions

View file

@ -1157,8 +1157,7 @@ def install_all_tools():
install_command = ["apt", "-y", "install"] # debian / ubuntu
if "ID=fedora\n" in os_release_lines:
tools_.remove("lua-check")
renames = {"lua5.3": "lua", "python3-bandit": "bandit", "ruby3.1": "ruby",
"xz-utils": "xz"}
renames = {"lua5.3": "lua", "python3-bandit": "bandit", "xz-utils": "xz"}
tools_ = [renames.get(tool, tool) for tool in tools_]
install_command = ["dnf", "-y", "install"]
elif "ID=arch\n" in os_release_lines:
@ -1166,8 +1165,8 @@ def install_all_tools():
tools_.remove("python3-pdfminer") # pdf2txt is not in arch
tools_.remove("perl-doc") # perldoc is in perl but not in the path
tools_.remove("7zip")
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz",
"g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc",
"golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
"pylint": "python-pylint", "python3-bandit": "bandit", "python3-mypy": "mypy"}
tools_ = [renames.get(tool, tool) for tool in tools_]
tools_ = ["python-" + tool[len("python3-"):] if tool.startswith("python3-") else tool
@ -1176,8 +1175,8 @@ def install_all_tools():
elif "ID=alpine\n" in os_release_lines:
tools_.remove("python3-bandit")
tools_.remove("wabt")
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "ruby3.1": "ruby", "xz-utils": "xz",
"g++": "gcc", "golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
renames = {"genisoimage": "cdrkit", "lua5.3": "lua", "xz-utils": "xz", "g++": "gcc",
"golang-go": "go", "lua-check": "luacheck", "php-cli": "php",
"pylint": "py3-pylint", "tidy": "tidyhtml"}
tools_ = [renames.get(tool, tool) for tool in tools_]
tools_ = ["py3-" + tool[len("python3-"):] if tool.startswith("python3-") else tool

View file

@ -248,7 +248,7 @@ tools_for_extensions = [
command = "cppcheck --error-exitcode=1"
[ruby_syntax]
dependencies = ["ruby3.1"]
dependencies = ["ruby"]
url = "http://www.ruby-lang.org/"
command = "ruby -c"