From 1ac7d9593fcd63a7845455fcde8e7688eec3ec5c Mon Sep 17 00:00:00 2001 From: xianshun Date: Mon, 20 Nov 2023 19:00:34 +0800 Subject: [PATCH] update on_run.lua --- tools/scripts/tasks/smart-rootfs/on_run.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/scripts/tasks/smart-rootfs/on_run.lua b/tools/scripts/tasks/smart-rootfs/on_run.lua index c562396..d414aca 100644 --- a/tools/scripts/tasks/smart-rootfs/on_run.lua +++ b/tools/scripts/tasks/smart-rootfs/on_run.lua @@ -68,9 +68,13 @@ function deploy_package(rootfs) local requireinfo = instance:requireinfo() local repo = instance:repo() local packagename = requireinfo.originstr + local packageversion = requireinfo.version local installdir = instance:installdir() local repodir = repo:url() local reponame = repo:name() + if(packageversion ~= "latest") then + packagename = string.match(packagename,"%S+") + end local deploy_script = path.join(repodir, "packages", packagename:sub(1, 1), packagename, "scripts", "deploy.lua") if os.isfile(deploy_script) then @@ -91,10 +95,14 @@ function export_package_to_sdkdir(sdkdir) for _, instance in ipairs(package.load_packages(requires, {requires_extra = requires_extra})) do local requireinfo = instance:requireinfo() local packagename = requireinfo.originstr + local packageversion = requireinfo.version local repo = instance:repo() local repodir = repo:url() local reponame = repo:name() local installdir = instance:installdir() + if(packageversion ~= "latest") then + packagename = string.match(packagename,"%S+") + end local export_script = path.join(repodir, "packages", packagename:sub(1, 1), packagename, "scripts", "export.lua") if os.isfile(export_script) then