From 3ad6ec2cad478f47da1f31fc531b691c0cb54eb9 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Fri, 8 Mar 2024 12:42:24 -0500 Subject: Restricted check of arched files to only non-optional files. --- src/lpm.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lpm.lua b/src/lpm.lua index 884be6d..38fa954 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -857,7 +857,7 @@ function Addon:install(bottle, installing) end - local has_arched_files = #common.grep(self.files or {}, function(e) return e.arch end) > 0 + local has_nonoptional_arched_files = #common.grep(self.files or {}, function(e) return e.arch and not e.optional end) > 0 for _, arch in ipairs(ARCH) do local has_one_file = false for _, file in ipairs(self.files or {}) do @@ -908,7 +908,7 @@ function Addon:install(bottle, installing) end end - if has_arched_files and not has_one_file and (not self.arch or (self.arch ~= "*" and #common.grep(self.arch, function(a) return a == arch end) == 0)) then + if has_nonoptional_arched_files and not has_one_file and (not self.arch or (self.arch ~= "*" and #common.grep(self.arch, function(a) return a == arch end) == 0)) then error("Addon " .. self.id .. " does not support arch " .. arch) end end -- cgit v1.2.3