Skip to content
Snippets Groups Projects
Verified Commit 486d31f9 authored by Karel Koci's avatar Karel Koci :metal:
Browse files

lists: fix increased priority from l10n packages

Standard for_l10n function provided by root updater script is creating
requests with default priority 50. This effectively increases priority
of all packages using it to include their languages.

The solution here is to decrease priority for language packages to
something very small (10 was chosen).

Also because we had to have copy of for_l10n function in bootstrap it
was instead moved from there to utils and provided as our own version
instead of updater's one.
Original function can potentially be dropped later on as Turris lists
are no longer using it thanks to this change.
parent a93147a1
1 merge request!235lists: fix increased priority from l10n packages
......@@ -27,15 +27,6 @@ if env_l10n then
end
Export('l10n')
-- This is helper function for including localization packages.
-- (This is copy of standard entry function that can be found in pkgupdate conf.lua)
function for_l10n(fragment)
for _, lang in pairs(l10n or {}) do
Install(fragment .. lang, {optional = true})
end
end
Export('for_l10n')
-- Aways include base script
Script('base.lua')
-- Include any additional lists
......
......@@ -31,7 +31,7 @@ if for_l10n and features.request_condition then
for _, plugin in pairs(foris_plugins) do
local fplugin = "foris-" .. plugin .. "-plugin"
Install(fplugin .. "-l10n-" .. lang, {
priority = 40,
priority = 10,
optional = true,
condition = fplugin
})
......@@ -39,7 +39,7 @@ if for_l10n and features.request_condition then
for _, plugin in pairs(reforis_plugins) do
local refplugin = "reforis-" .. plugin .. "-plugin"
Install(refplugin .. "-l10n-" .. lang, {
priority = 40,
priority = 10,
optional = true,
condition = refplugin
})
......
......@@ -88,11 +88,11 @@ local luci_apps = {
}
-- Conditional install requests for language packages
if for_l10n and features.request_condition then
if features.request_condition then
for _, lang in pairs({"en", unpack(l10n or {})}) do
for _, name in pairs(luci_apps) do
Install("luci-i18n-" .. name .. "-" .. lang, {
priority = 40,
priority = 10,
optional = true,
condition = "luci-app-" .. name
})
......@@ -103,13 +103,12 @@ end
Install("luci", "luci-base", "luci-lighttpd", { priority = 40 })
if for_l10n then
Install("luci-i18n-base-en", { optional = true })
Install("luci-i18n-base-en", { optional = true, priority = 10 })
for_l10n("luci-i18n-base-")
end
Install("luci-app-commands", { priority = 40 })
Install("luci-proto-ipv6", "luci-proto-ppp", { priority = 40 })
-- Install resolver-debug for DNS debuging
Install("resolver-debug", { priority = 40 })
......
......@@ -54,4 +54,11 @@ function list_script(list)
Script((repo_base_uri or "https://repo.turris.cz/hbs") .. "/" .. board .. "/lists/" .. list)
end
end
-- Our own version of for_l10n to override priority
function for_l10n(fragment)
for _, lang in pairs(l10n or {}) do
Install(fragment .. lang, {optional = true, priority = 10})
end
end
----------------------------------------------------------------------------------
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment