diff options
| author | ruki <[email protected]> | 2022-10-10 22:37:39 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-10 22:37:39 +0800 |
| commit | a9e8492bcc68823067d805a7ee666e99c08ad02f (patch) | |
| tree | 9bff8e4f5d3f0a77a4df0eb508584c952a057e89 /xmake/modules/private/action/require/impl/package.lua | |
| parent | 4eab4583144dd0319c33431a557a06905c811ef5 (diff) | |
add package.install_always policy
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 71f75d418..0608a3960 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -949,9 +949,9 @@ end -- @see https://github.com/xmake-io/xmake/issues/2719 function _compatible_with_previous_librarydeps(package, opt) - -- skip to check compatibility? + -- skip to check compatibility if installation has been finished opt = opt or {} - if opt.check_compatibility == false then + if opt.install_finished then return true end @@ -1036,9 +1036,13 @@ end -- this package should be install? function should_install(package, opt) + opt = opt or {} if package:is_template() then return false end + if not opt.install_finished and package:policy("package.install_always") then + return true + end if package:exists() and _compatible_with_previous_librarydeps(package, opt) then return false end |
