summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-04-13 00:35:14 +0800
committerruki <[email protected]>2021-04-13 00:35:14 +0800
commit4be6f58a6f5669cd71438907a3fd4d6cb35c7caf (patch)
treea28366ff209c99abca902a13eac114051d78864d
parent94c655f43fe2141e0e6d187602ae88b8c3fa6e10 (diff)
fix fetch package
-rw-r--r--xmake/modules/private/action/require/impl/package.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index a2357f984..72ea3807a 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -69,9 +69,9 @@ end
-- - add_requires("zlib~shared", {configs = {shared = true}, alias = "zlib_shared"})
--
-- {system = nil/true/false}:
--- nil: get local or system packages
+-- nil: get remote or system packages
-- true: only get system package
--- false: only get local packages
+-- false: only get remote packages
--
--
function _parse_require(require_str)
@@ -614,6 +614,11 @@ function should_install(package)
if package:is_fetchonly() then
return false
end
+ -- only get system package? e.g. add_requires("xxx", {system = true})
+ local requireinfo = package:requireinfo()
+ if requireinfo and requireinfo.system then
+ return false
+ end
if package:parents() then
-- if all the packages that depend on it already exist, then there is no need to install it
for _, parent in pairs(package:parents()) do