diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/actions/install.lua | 3 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/actions/install.lua b/xmake/modules/private/action/require/impl/actions/install.lua index 29725e973..2a422795f 100644 --- a/xmake/modules/private/action/require/impl/actions/install.lua +++ b/xmake/modules/private/action/require/impl/actions/install.lua @@ -274,7 +274,8 @@ function main(package) else -- build and install package to the install directory - if option.get("force") or not package:manifest_load() then + local force_reinstall = package:data("force_reinstall") or option.get("force") + if force_reinstall or not package:manifest_load() then -- clean install directory first os.tryrm(package:installdir()) diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 46bc16fed..a506a66c0 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -1018,6 +1018,9 @@ function _compatible_with_previous_linkdeps(package, opt) if not is_compatible and #compatible_tips > 0 then package:data_set("linkdeps.compatible_tips", compatible_tips) end + if not is_compatible then + package:data_set("force_reinstall", true) + end return is_compatible end |
