fix broken dependencies management
This commit is contained in:
parent
11403084e7
commit
ee6f006b79
@ -104,7 +104,7 @@ pack.get_info(packids: table) -> {id={...}, id2={...}, ...}
|
|||||||
```
|
```
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
pack.assemble(packis: table) -> table
|
pack.assemble(packids: table) -> table
|
||||||
```
|
```
|
||||||
|
|
||||||
Checks the configuration for correctness and adds dependencies, returning the complete configuration.
|
Checks the configuration for correctness and adds dependencies, returning the complete configuration.
|
||||||
|
|||||||
@ -92,7 +92,7 @@ pack.get_info(packids: table) -> {id={...}, id2={...}, ...}
|
|||||||
```
|
```
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
pack.assemble(packis: table) -> table
|
pack.assemble(packids: table) -> table
|
||||||
```
|
```
|
||||||
|
|
||||||
Проверяет корректность конфигурации и добавляет зависимости, возвращая полную.
|
Проверяет корректность конфигурации и добавляет зависимости, возвращая полную.
|
||||||
|
|||||||
@ -33,4 +33,5 @@
|
|||||||
onup="on_history_up()"
|
onup="on_history_up()"
|
||||||
ondown="on_history_down()">
|
ondown="on_history_down()">
|
||||||
</textbox>
|
</textbox>
|
||||||
|
<textbox size="200" margin="20" multiline="true" text-wrap="true" autoresize="false"/>
|
||||||
</container>
|
</container>
|
||||||
|
|||||||
@ -347,12 +347,6 @@ function refresh()
|
|||||||
packs_info[id] = {packinfo.id, packinfo.title}
|
packs_info[id] = {packinfo.id, packinfo.title}
|
||||||
end
|
end
|
||||||
|
|
||||||
for i,id in ipairs(packs_installed) do
|
|
||||||
if table.has(required, id) then
|
|
||||||
document["pack_"..id].enabled = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if #packs_excluded == 0 then packs_excluded = table.copy(packs_available) end
|
if #packs_excluded == 0 then packs_excluded = table.copy(packs_available) end
|
||||||
if #packs_included == 0 then packs_included = table.copy(packs_installed) end
|
if #packs_included == 0 then packs_included = table.copy(packs_installed) end
|
||||||
|
|
||||||
@ -372,6 +366,12 @@ function refresh()
|
|||||||
place_pack(packs_add, packinfo, callback, string.format('reposition_func("%s")', packinfo.id))
|
place_pack(packs_add, packinfo, callback, string.format('reposition_func("%s")', packinfo.id))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for i,id in ipairs(packs_installed) do
|
||||||
|
if table.has(required, id) then
|
||||||
|
document["pack_"..id].enabled = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
check_deleted()
|
check_deleted()
|
||||||
apply_movements(packs_cur, packs_add)
|
apply_movements(packs_cur, packs_add)
|
||||||
refresh_changes()
|
refresh_changes()
|
||||||
|
|||||||
@ -115,10 +115,8 @@ static bool resolve_dependencies(
|
|||||||
.processOperator(dep.op, Version(dep.version))
|
.processOperator(dep.op, Version(dep.version))
|
||||||
) {
|
) {
|
||||||
// dependency pack version meets the required one
|
// dependency pack version meets the required one
|
||||||
continue;
|
|
||||||
} else if (dep.version == "*" || dep.version == dep_pack.version){
|
} else if (dep.version == "*" || dep.version == dep_pack.version){
|
||||||
// fallback: dependency pack version also meets required one
|
// fallback: dependency pack version also meets required one
|
||||||
continue;
|
|
||||||
} else {
|
} else {
|
||||||
throw contentpack_error(
|
throw contentpack_error(
|
||||||
dep.id,
|
dep.id,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user