diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-27 14:49:58 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-27 14:54:36 -0300 |
commit | ef724a68449938f6ab9ccf58bdcf8234bac87b06 (patch) | |
tree | cbdb9536bc7943109f2dc9437fbd2d077366a040 | |
parent | 4934b8e3b5560db2cca7aaa768e1ddc4e936b4e8 (diff) | |
download | luarocks-ef724a68449938f6ab9ccf58bdcf8234bac87b06.tar.gz luarocks-ef724a68449938f6ab9ccf58bdcf8234bac87b06.tar.bz2 luarocks-ef724a68449938f6ab9ccf58bdcf8234bac87b06.zip |
binary: encode dependency order (luasec depends on luasocket)
-rwxr-xr-x | binary/all_in_one | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/binary/all_in_one b/binary/all_in_one index 784ce1ec..9b675eba 100755 --- a/binary/all_in_one +++ b/binary/all_in_one | |||
@@ -463,24 +463,36 @@ local function main() | |||
463 | 463 | ||
464 | local dependencies = { | 464 | local dependencies = { |
465 | md5 = "md5", | 465 | md5 = "md5", |
466 | luasocket = "./binary/luasocket-3.1.0-1.rockspec", | ||
466 | luasec = "./binary/luasec-1.3.2-1.rockspec", | 467 | luasec = "./binary/luasec-1.3.2-1.rockspec", |
467 | ["lua-zlib"] = "./binary/lua-zlib-1.2-0.rockspec", | 468 | ["lua-zlib"] = "./binary/lua-zlib-1.2-0.rockspec", |
468 | ["lua-bz2"] = "./binary/lua-bz2-0.2.1-1.rockspec", | 469 | ["lua-bz2"] = "./binary/lua-bz2-0.2.1-1.rockspec", |
469 | luaposix = if_platform("unix", "./binary/luaposix-35.1-1.rockspec"), | 470 | luaposix = if_platform("unix", "./binary/luaposix-35.1-1.rockspec"), |
470 | luasocket = "./binary/luasocket-3.1.0-1.rockspec", | ||
471 | luafilesystem = "luafilesystem", | 471 | luafilesystem = "luafilesystem", |
472 | } | 472 | } |
473 | 473 | ||
474 | local dependency_order = { | ||
475 | "md5", | ||
476 | "luasocket", "luasec", | ||
477 | "lua-zlib", | ||
478 | "lua-bz2", | ||
479 | "luaposix", | ||
480 | "luafilesystem", | ||
481 | } | ||
482 | |||
474 | fs.make_dir(LUA_MODULES) | 483 | fs.make_dir(LUA_MODULES) |
475 | for name, arg in pairs(dependencies) do | 484 | for _, name in ipairs(dependency_order) do |
476 | print("----------------------------------------------------------------") | 485 | local use = dependencies[name] |
477 | print(name) | 486 | if use then |
478 | print("----------------------------------------------------------------") | 487 | print("----------------------------------------------------------------") |
479 | local vers = manif.get_versions(queries.from_dep_string(name), "one") | 488 | print(name) |
480 | if not next(vers) then | 489 | print("----------------------------------------------------------------") |
481 | local ok = os.execute("LUAROCKS_CONFIG='" .. CONFIG_FILE .. "' ./luarocks install --no-project '--tree=" .. LUA_MODULES .. "' " .. arg) | 490 | local vers = manif.get_versions(queries.from_dep_string(name), "one") |
482 | if ok ~= 0 and ok ~= true then | 491 | if not next(vers) then |
483 | error("Failed building dependency: " .. name) | 492 | local ok = os.execute("LUAROCKS_CONFIG='" .. CONFIG_FILE .. "' ./luarocks install --no-project '--tree=" .. LUA_MODULES .. "' " .. use) |
493 | if ok ~= 0 and ok ~= true then | ||
494 | error("Failed building dependency: " .. name) | ||
495 | end | ||
484 | end | 496 | end |
485 | end | 497 | end |
486 | end | 498 | end |