summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl
diff options
context:
space:
mode:
authorruki <[email protected]>2021-03-12 00:41:28 +0800
committerruki <[email protected]>2021-03-12 00:41:28 +0800
commite963699a72d351970cbd31246b601a9731e006a5 (patch)
tree743f2729bade415410695fa2b18b5dc7dd0fdf6c /xmake/modules/private/action/require/impl
parent051264aa60973d3b7a1654412ea936e1da3a515c (diff)
support fetchonly
Diffstat (limited to 'xmake/modules/private/action/require/impl')
-rw-r--r--xmake/modules/private/action/require/impl/actions/install.lua2
-rw-r--r--xmake/modules/private/action/require/impl/install_packages.lua4
-rw-r--r--xmake/modules/private/action/require/impl/package.lua4
-rw-r--r--xmake/modules/private/action/require/impl/register_packages.lua2
4 files changed, 8 insertions, 4 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua
index e280d0cec..91cee4ba3 100644
--- a/xmake/modules/private/action/require/impl/actions/install.lua
+++ b/xmake/modules/private/action/require/impl/actions/install.lua
@@ -146,7 +146,7 @@ function main(package)
-- install the third-party package directly, e.g. brew::pcre2/libpcre2-8, conan::OpenSSL/1.0.2n@conan/stable
local installed_now = false
- if package:is3rd() then
+ if package:is_thirdparty() then
local script = package:script("install")
if script ~= nil then
filter.call(script, package)
diff --git a/xmake/modules/private/action/require/impl/install_packages.lua b/xmake/modules/private/action/require/impl/install_packages.lua
index 036f2ac2d..d89f83e05 100644
--- a/xmake/modules/private/action/require/impl/install_packages.lua
+++ b/xmake/modules/private/action/require/impl/install_packages.lua
@@ -105,8 +105,8 @@ function _get_confirm(packages)
local packages_group = {}
for _, instance in ipairs(packages) do
-- achive packages by repository
- local reponame = instance:repo() and instance:repo():name() or (instance:isSys() and "system" or "")
- if instance:is3rd() then
+ local reponame = instance:repo() and instance:repo():name() or (instance:is_system() and "system" or "")
+ if instance:is_thirdparty() then
reponame = instance:name():lower():split("::")[1]
end
packages_repo[reponame] = packages_repo[reponame] or {}
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index 3095e10a9..c088bef4c 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -587,6 +587,10 @@ function should_install(package)
if package:exists() then
return false
end
+ -- we need not install it if this package need only be fetched
+ if package:is_fetchonly() 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
diff --git a/xmake/modules/private/action/require/impl/register_packages.lua b/xmake/modules/private/action/require/impl/register_packages.lua
index 21716bc3f..485da8770 100644
--- a/xmake/modules/private/action/require/impl/register_packages.lua
+++ b/xmake/modules/private/action/require/impl/register_packages.lua
@@ -68,7 +68,7 @@ end
-- register the base info of required package
function _register_required_package_base(instance, required_package)
- if not instance:isSys() and not instance:is3rd() then
+ if not instance:is_system() and not instance:is_thirdparty() then
required_package:set("__installdir", instance:installdir())
end
end