feat(pkg): 更新包管理系统并升级至LeonOS 0.3.6

- 将包安装目录从/leonos/packages迁移至/packages
- 更新版本号至0.3.6
- 修改installer.lua以正确处理packages目录
- 更新pkg.lua程序适配新的包路径
- 添加示例包文件到新位置
This commit is contained in:
2025-09-02 09:51:29 +08:00
parent 5bf8abf22f
commit 9867d4522c
7 changed files with 16 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
-- LeonOS installer
local INSTALLER_VERSION = "0.3.5"
local INSTALLER_VERSION = "0.3.6"
local DEFAULT_ROM_DIR = "/leonos"
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
@@ -114,6 +114,7 @@ local function bullet(t)
tu.coloredWrite(colors.red, "- ", colors.white, t)
end
-- Function for "xxx...OK"
local function ok()
tu.coloredPrint(colors.green, "OK", colors.white)
end
@@ -132,7 +133,12 @@ local to_dl = {}
for _, v in pairs(repodata.tree) do
if v.path and v.path:sub(1,#look) == look then
v.path = v.path:sub(#look+1)
v.real_path = v.path:gsub("^/?rom", ROM_DIR)
-- 特殊处理packages文件夹将其放在根目录
if v.path:sub(1, 9) == "packages/" then
v.real_path = v.path
else
v.real_path = v.path:gsub("^/?rom", ROM_DIR)
end
to_dl[#to_dl+1] = v
end
end