diff options
| author | ruki <[email protected]> | 2026-01-14 00:52:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-14 00:52:59 +0800 |
| commit | 02cd7a65f48466d73ea2ead486a55dfc9109149e (patch) | |
| tree | 5383f26b7eccc1f7bb43772491a7ff48d486e38c /xmake/modules | |
| parent | 54da3b896476358af87003a46726ab5d17d57f96 (diff) | |
improve to lock packages
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/private/action/require/impl/lock_packages.lua | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/xmake/modules/private/action/require/impl/lock_packages.lua b/xmake/modules/private/action/require/impl/lock_packages.lua index fe5642f6f..61cc19a85 100644 --- a/xmake/modules/private/action/require/impl/lock_packages.lua +++ b/xmake/modules/private/action/require/impl/lock_packages.lua @@ -39,15 +39,10 @@ function _lock_package(instance) result.branch = instance:branch() result.tag = instance:tag() if repo then - local lastcommit - local manifest = instance:manifest_load() - if manifest and manifest.repo then - lastcommit = manifest.repo.commit - end - if not lastcommit then - lastcommit = repo:commit() - end - result.repo = {url = repo:url(), commit = lastcommit, branch = repo:branch()} + -- Even when locking pre-compiled packages, + -- we always use the repo and commit info in the current repository (instead of precompiled-artifacts manifest) + -- to ensure that the repo information remains stable when reverting to source code installation. + result.repo = {url = repo:url(), commit = repo:commit(), branch = repo:branch()} end return result end |
