aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 3dc06fa..8959f87 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -1810,6 +1810,7 @@ function lpm.lite_xl_run(version, ...)
if is_argument_repo(str) then
table.insert(repositories, 1, Repository.url(str):add(AUTO_PULL_REMOTES))
system_bottle:invalidate_cache()
+ repositories[1].explicit = true
else
local id, version = common.split(":", str)
local potentials = { system_bottle:get_addon(id, version, { mod_version = lite_xl.mod_version }) }
@@ -1817,13 +1818,18 @@ function lpm.lite_xl_run(version, ...)
local found_one = false
for i, addon in ipairs(potentials) do
if addon:is_core(system_bottle) then
- uniq[addon.id] = true
+ uniq[addon.id] = addon
found_one = true
elseif not addon:is_orphan(system_bottle) and not uniq[addon.id] then
table.insert(addons, addon)
- uniq[addon.id] = true
+ uniq[addon.id] = addon
found_one = true
end
+
+ if i > 1 and uniq[addon.id] and uniq[addon.id] ~= addon and addon.repository and addon.repository.explicit then
+ log.warning("your explicitly specified repository " .. addon.repository:url() .. " has a version of " .. addon.id .. " lower than that in " .. uniq[addon.id].repository:url() .. " (" .. addon.version .. " vs. " .. uniq[addon.id].version ..
+ "; in order to use the one in your specified repo, please specify " .. addon.id .. ":" .. addon.version)
+ end
end
if not found_one then error("can't find addon " .. str) end
end