summaryrefslogtreecommitdiff
path: root/xmake/actions/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-01-02 00:40:43 +0800
committerruki <[email protected]>2021-01-02 00:40:43 +0800
commit0e0450e7ac3d726f0728c698d2beb9d6b02c0a70 (patch)
treead87dbde028a4102c1d3f33e136b0c8e24a1cacf /xmake/actions/require/impl/package.lua
parent23cf7e2df45344351c7dd30dad8742282fb74363 (diff)
fix package cache conflicts
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
-rw-r--r--xmake/actions/require/impl/package.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua
index 0f1f78277..78e34863d 100644
--- a/xmake/actions/require/impl/package.lua
+++ b/xmake/actions/require/impl/package.lua
@@ -468,6 +468,13 @@ function _load_package(packagename, requireinfo, opt)
_memcache():set2("packageids", packagename, (packageid or 0) + 1)
package:displayname_set(displayname)
+ -- disable parallelize if the package cache directory conflicts
+ local cachedirs = _memcache():get2("cachedirs", package:cachedir())
+ if cachedirs then
+ package:set("parallelize", false)
+ end
+ _memcache():set2("cachedirs", package:cachedir(), true)
+
-- add some builtin configurations to package
_add_package_configurations(package)