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

lists: fix problems with not removed luci applications

This reverts to previous approach for Luci localization packages. It
introduces back problems that language packages are installed only to
apps introduced by updater lists but there is no way around it. This
implementation was problematic as it kept installed packages in place
because of language packages depending on package that was suppose to be
removed. This meant that such package was hold in place by language
package that was in turn hold in place by information that parent
package is installed. It created cycle that updater was not able to
break (only opkg). This fixes this issue.
parent 146e3c1e
No related merge requests found
local function luci_app(...)
for app in pairs(...) do
Install("luci-app-" .. app, { priority = 40 })
if for_l10n then
Install("luci-i18n-" .. app .. "-en", { optional = true })
for_l10n("luci-i18n-" .. app .. "-")
end
end
end
local function luci_proto(...)
for proto in pairs(...) do
Install("luci-proto-" .. proto, { priority = 40 })
end
end
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
Install("luci", "luci-lighttpd", { priority = 40 })
forInstall(luci,base,proto-ipv6,proto-ppp,app-commands)
--[[
All packages with localization packages
Generated using:
curl https://repo.turris.cz/hbd/omnia/packages/luci/Packages | sed -n '/Package: luci-i18n-/,/^$/{ s/Depends:.*luci-app-\([^ ,]\+\).*/\1/p }' | sort | uniq | sed 's/^/"/;s/$/",/'
]]
local luci_apps = {
"adblock",
"advanced-reboot",
"ahcp",
"aria2",
"bcp38",
"clamav",
"commands",
"ddns",
"diag-core",
"dnscrypt-proxy",
"dynapoint",
"firewall",
"fwknopd",
"hd-idle",
"https_dns_proxy",
"minidlna",
"mjpg-streamer",
"mwan3",
"nft-qos",
"nlbwmon",
"noddos",
"ntpc",
"nut",
"olsr",
"openvpn",
"opkg",
"p910nd",
"pagekitec",
"polipo",
"privoxy",
"qos",
"radicale",
"radicale2",
"rp-pppoe-server",
"samba",
"samba4",
"shadowsocks-libev",
"shairplay",
"simple-adblock",
"splash",
"statistics",
"tinyproxy",
"transmission",
"travelmate",
"uhttpd",
"unbound",
"upnp",
"vnstat",
"vpnbypass",
"watchcat",
"wifischedule",
"wireguard",
"wol",
}
--[[
Some packages have separate EN support. This is only few packages so we list them
instead of having warning for multiple packages missing.
Generated using:
curl https://repo.turris.cz/hbd/omnia/packages/luci/Packages | sed -n 's/^Package: luci-i18n-\(.*\)-en.*/\1/p' | sort | sed 's/^/["/;s/$/"] = true,/'
]]
local luci_i18n_en = {
["ahcp"] = true,
["base"] = true,
["commands"] = true,
["diag-core"] = true,
["firewall"] = true,
["fwknopd"] = true,
["hd-idle"] = true,
["minidlna"] = true,
["ntpc"] = true,
["nut"] = true,
["olsr"] = true,
["openvpn"] = true,
["opkg"] = true,
["p910nd"] = true,
["polipo"] = true,
["qos"] = true,
["radicale2"] = true,
["rp-pppoe-server"] = true,
["samba"] = true,
["samba4"] = true,
["splash"] = true,
["statistics"] = true,
["tinyproxy"] = true,
["transmission"] = true,
["uhttpd"] = true,
["upnp"] = true,
["vnstat"] = true,
["watchcat"] = true,
["wol"] = true,
}
Install("luci", "luci-base", "luci-lighttpd", { priority = 40 })
if for_l10n then
Install("luci-i18n-base-en", { optional = true })
for_l10n("luci-i18n-base-")
for _, app in pairs(luci_apps) do
if installed["luci-app-" .. app] then
if luci_i18n_en[app] then
Install("luci-i18n-" .. app .. "-en", { optional = true })
end
for_l10n("luci-i18n-" .. app .. "-")
else
--[[
We are not aware that we should install i18n unless it is installed
already so we instead request replan on finish to install missing i18n
packages.
]]
Package("luci-app-" .. app, { replan = "finished"})
end
end
end
luci_app("commands")
luci_proto("ipv6", "ppp")
_END_FEATURE_GUARD_
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
-- 3G
......@@ -10,6 +11,6 @@ Install("usb-modeswitch", { priority = 40 })
forInstall(kmod,nf-nathelper-extra,usb-net-rndis,usb-net-qmi-wwan,usb-serial-option,usb-serial-qualcomm)
-- Luci
Install("luci-proto-3g", { priority = 40 })
luci_proto("3g")
_END_FEATURE_GUARD_
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
forInstall(luci-app,ahcp,adblock,bcp38,firewall,minidlna,mjpg-streamer,sqm,statistics,tinyproxy,transmission,upnp)
forInstall(luci-proto,openconnect,relay,vpnc)
Install("luci-theme-bootstrap", { priority = 40 })
luci_app("ahcp", "adblock", "bcp38", "firewall", "minidlna", "mjpg-streamer", "sqm", "statistics", "tinyproxy", "transmission", "upnp")
if board == "omnia" or board == "turris1x" then
Install('luci-app-rainbow', { priority = 40 })
luci_app('rainbow')
end
luci_proto("openconnect", "relay", "vpnc")
_END_FEATURE_GUARD_
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
Install("lxc", { priority = 40 })
forInstall(lxc,attach,auto,console,copy,create,destroy,freeze,info,ls,monitor,monitord,snapshot,start,stop,unfreeze)
Install("luci-app-lxc", { priority = 40 })
luci_app("lxc")
Install("kmod-veth", { priority = 40 })
Install("gnupg", "gnupg-utils", "getopt", "tar", "wget", { priority = 40 })
......
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
-- Kernel --
......@@ -35,7 +36,7 @@ Install("sshfs", { priority = 40 })
Install("wget", "rsync", "rsyncd", "samba36-client", "samba36-server", { priority = 40 })
-- Luci
forInstall(luci-app,hd-idle,minidlna,samba)
luci_app("hd-idle","minidlna", "samba")
Install("luci-mod-admin-full", { priority = 40 })
-- Encryption --
......
include(utils.m4)dnl Include utility macros
include(luci-utils.m4)dnl
_FEATURE_GUARD_
-- Kernel
Install("kmod-usb-printer", { priority = 40 })
-- Luci
Install("luci-app-p910nd", { priority = 40 })
luci_app("p910nd")
_END_FEATURE_GUARD_
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