diff options
| author | ruki <[email protected]> | 2021-08-15 00:05:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-15 00:05:55 +0800 |
| commit | 28c02f2323aaa4595b8474c6a01e6ffc28181396 (patch) | |
| tree | 5f34fc2083c02b116f8074c96796b4f4d7f514bf | |
| parent | a19fc6d6da6627b5bdab702931ab6278e8cf8409 (diff) | |
update lock info
4 files changed, 115 insertions, 3 deletions
diff --git a/tests/projects/package/multiconfig/xmake-requires.lock b/tests/projects/package/multiconfig/xmake-requires.lock index 5752aa15a..c5031a33c 100644 --- a/tests/projects/package/multiconfig/xmake-requires.lock +++ b/tests/projects/package/multiconfig/xmake-requires.lock @@ -1,5 +1,17 @@ { zlib = { - buildhash = "8e5b898b0f344715bac89cc6a1577506" + buildhash = "b76a297309d14c09b42cfe3927260a51", + name = "zlib", + version = "1.2.11" + }, + ["zlib~debug"] = { + buildhash = "e6a6fa6a86ad4fc7ae3c2cf7c60cc084", + name = "zlib", + version = "1.2.11" + }, + ["zlib~shared"] = { + buildhash = "8e5b898b0f344715bac89cc6a1577506", + name = "zlib", + version = "1.2.11" } }
\ No newline at end of file diff --git a/tests/projects/package/toolchain_muslcc/xmake-requires.lock b/tests/projects/package/toolchain_muslcc/xmake-requires.lock new file mode 100644 index 000000000..8fa6e9982 --- /dev/null +++ b/tests/projects/package/toolchain_muslcc/xmake-requires.lock @@ -0,0 +1,93 @@ +{ + autoconf = { + arch = "x86_64", + buildhash = "01974c48f52d4d658f58852351743754", + kind = "binary", + name = "autoconf", + plat = "macosx", + version = "2.69" + }, + automake = { + arch = "x86_64", + buildhash = "7a090c93706241f983f0d821a162e8a5", + kind = "binary", + name = "automake", + plat = "macosx", + version = "1.16.1" + }, + cmake = { + arch = "x86_64", + buildhash = "a6d18f8c0bf347d980f8bb762583c91a", + kind = "binary", + name = "cmake", + plat = "macosx", + version = "3.21.0" + }, + gmp = { + arch = "x86_64", + buildhash = "7dd9c224447e46698ac73d29f58b1d73", + name = "gmp", + plat = "macosx", + version = "6.2.1" + }, + libisl = { + arch = "x86_64", + buildhash = "f649e1fb365e442e8f79f372fd91483b", + name = "libisl", + plat = "macosx", + version = "0.22" + }, + libogg = { + arch = "arm", + buildhash = "d894fc29f2fb4c45a0f48bc2c6ece273", + name = "libogg", + plat = "cross", + version = "v1.3.4" + }, + libplist = { + arch = "arm", + buildhash = "0c01b22920be4876b1de74629194eb8f", + name = "libplist", + plat = "cross", + version = "2.2.0" + }, + libtool = { + arch = "x86_64", + buildhash = "64584ec84a4743ecb740b598b263ffa6", + kind = "binary", + name = "libtool", + plat = "macosx", + version = "2.4.6" + }, + m4 = { + arch = "x86_64", + buildhash = "fd0e83e5759b442a970327ebb1c89793", + kind = "binary", + name = "m4", + plat = "macosx", + version = "1.4.19" + }, + muslcc = { + arch = "x86_64", + buildhash = "11062c09ebeb484594488ad73ddbcd1f", + kind = "toolchain", + name = "muslcc", + plat = "macosx", + version = "20210202" + }, + ["pkg-config"] = { + arch = "x86_64", + buildhash = "84fd7f9b9f7a47709512cfc85cd9e5f7", + kind = "binary", + name = "pkg-config", + plat = "macosx", + version = "0.29.2" + }, + zlib = { + arch = "arm", + buildhash = "be90a245b8bb48e6b08a1a15bdcad467", + name = "zlib", + plat = "cross", + version = "1.2.11" + } +}
\ No newline at end of file diff --git a/tests/projects/package/toolchain_muslcc/xmake.lua b/tests/projects/package/toolchain_muslcc/xmake.lua index bf5e98e8c..b111d5976 100644 --- a/tests/projects/package/toolchain_muslcc/xmake.lua +++ b/tests/projects/package/toolchain_muslcc/xmake.lua @@ -4,6 +4,9 @@ add_rules("mode.debug", "mode.release") set_plat("cross") set_arch("arm") +-- lock requires +set_policy("package.requires_lock", true) + -- add library packages -- for testing zlib/xmake, libplist/autoconf, libogg/cmake add_requires("zlib", "libogg", {system = false}) diff --git a/xmake/modules/private/action/require/impl/lock_packages.lua b/xmake/modules/private/action/require/impl/lock_packages.lua index fffb76dfa..8d1e0ebdd 100644 --- a/xmake/modules/private/action/require/impl/lock_packages.lua +++ b/xmake/modules/private/action/require/impl/lock_packages.lua @@ -24,7 +24,12 @@ import("core.project.project") -- lock package function _lock_package(instance) local result = {} + result.name = instance:name() + result.plat = instance:plat() + result.arch = instance:arch() + result.kind = instance:kind() result.buildhash = instance:buildhash() + result.version = instance:version_str() return result end @@ -32,9 +37,8 @@ end function main(packages) local results = {} for _, instance in ipairs(packages) do - results[instance:name()] = _lock_package(instance) + results[instance:displayname()] = _lock_package(instance) end - table.sort(results, function (a, b) return a.name < b.name end) io.writefile(project.requireslock(), string.serialize(results, {orderkeys = true})) end |
