From 9a18551f7ef76f435283eec84e2e1b0edd87b0f5 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 19 Sep 2023 22:44:46 +0800 Subject: disable urls #4213 --- xmake/core/package/package.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index d0c6ecd88..074e35b29 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -270,7 +270,14 @@ end -- get urls function _instance:urls() - return self._URLS or table.wrap(self:get("urls")) + local urls = self._URLS + if urls == nil then + urls = table.wrap(self:get("urls")) + if #urls == 1 and urls[1] == "" then + urls = {} + end + end + return urls end -- get urls @@ -615,7 +622,7 @@ end -- is local embed source code package? -- we install directly from the local source code instead of downloading it remotely function _instance:is_source_embed() - return self:get("sourcedir") and self:script("install") + return self:get("sourcedir") and #self:urls() == 0 and self:script("install") end -- is local embed binary package? it's come from `xmake package` -- cgit v1.3.1