From 001afbbf331e84660df567f3c6888ebc830d3134 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= <cynerd@email.cz>
Date: Thu, 12 Nov 2020 10:17:18 +0100
Subject: [PATCH] lists/base-fix: reinstall luci-base to prevent files
 collision

Merge of luci-lighttpd and patch that was providing webapps files for
luci to package turris-webapps-luci caused file collision. The cause is
that patch adding webapps did not change version of luci-base package.
The solution is to just reinstall luci-base package to remove
conflicting files.
This affects mostly only HBL and HBD. It is most probable that update
between versions is going to bump LuCI version and solve it that way
insteand. At the same time it won't harm to have this.
---
 lists/base-fix.lua | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lists/base-fix.lua b/lists/base-fix.lua
index c8db0fc9c..e6412ae4e 100644
--- a/lists/base-fix.lua
+++ b/lists/base-fix.lua
@@ -123,3 +123,16 @@ if version_match and installed and installed["cznic-cacert-bundle"] then
 	Install("fix-cleanup-cert-backup")
 	Package("fix-cleanup-cert-backup", { replan = "finished" })
 end
+
+-- With Turris OS 5.2.0 packages luci-lighttpd and turris-webapps integration
+-- included in luci-base was merged to single dedicated package
+-- turris-webapps-luci. Problem is that luci-base was handled by patch that did
+-- caused no version change so we can end up potentially with conflict between
+-- previous luci-base and new turris-webapps-luci. This simply requests reinstall
+-- when luci-lighttpd is installed. It is not the cause but it should be removed
+-- at the same time as this error is being resolved.
+if installed and installed["luci-lighttpd"] and not installed["turris-webapps-luci"] then
+	-- Note: condition here makes this request prety much ignored and so we won't
+	-- interfere with install priorities.
+	Install("luci-base", { reinstall = true, condition = "luci-base" })
+end
-- 
GitLab