diff options
| author | ruki <[email protected]> | 2021-08-21 16:41:45 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-08-21 16:41:45 +0800 |
| commit | 38c33512003a92adfc8cba6f50409d9e78df3868 (patch) | |
| tree | ac5efd98a94ba22abff2cdaf4cc3b119723b09df | |
| parent | 5e73fb8a86de1a6e10739d3c348d40607942c165 (diff) | |
improve requirekey
3 files changed, 20 insertions, 20 deletions
diff --git a/tests/projects/package/multiconfig/xmake-requires.lock b/tests/projects/package/multiconfig/xmake-requires.lock index 6b10a5235..e162c68b2 100644 --- a/tests/projects/package/multiconfig/xmake-requires.lock +++ b/tests/projects/package/multiconfig/xmake-requires.lock @@ -3,29 +3,29 @@ version = "1.0" }, ["macosx|x86_64"] = { - ["zlib#ddbdd8b8f76d455a8c0ef45fffe37160"] = { + ["zlib#31fecfc4"] = { buildhash = "b76a297309d14c09b42cfe3927260a51", repo = { branch = "master", - commit = "d0e1f98585a4ec31b056fe3bda65a4fe37e0b375", + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.2.11" }, - ["zlib~debug#d72a8a937b694e449bce540c8eb65a8a"] = { + ["zlib~debug#55833b12"] = { buildhash = "e6a6fa6a86ad4fc7ae3c2cf7c60cc084", repo = { branch = "master", - commit = "d0e1f98585a4ec31b056fe3bda65a4fe37e0b375", + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.2.11" }, - ["zlib~shared#b286744a1898416faad2e5cab0104b2f"] = { + ["zlib~shared#b6ab42cb"] = { buildhash = "8e5b898b0f344715bac89cc6a1577506", repo = { branch = "master", - commit = "d0e1f98585a4ec31b056fe3bda65a4fe37e0b375", + commit = "eda7adee81bac151f87c507030cc0dd8ab299462", url = "https://gitee.com/tboox/xmake-repo.git" }, version = "1.2.11" diff --git a/tests/projects/package/toolchain_muslcc/xmake-requires.lock b/tests/projects/package/toolchain_muslcc/xmake-requires.lock index 4a07f4618..8c55e49ea 100644 --- a/tests/projects/package/toolchain_muslcc/xmake-requires.lock +++ b/tests/projects/package/toolchain_muslcc/xmake-requires.lock @@ -3,7 +3,7 @@ version = "1.0" }, ["macosx|x86_64"] = { - ["autoconf#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["autoconf#31fecfc4"] = { buildhash = "cd4169a7cb484832b2f70d2174072ca2", repo = { branch = "master", @@ -12,7 +12,7 @@ }, version = "2.71" }, - ["automake#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["automake#31fecfc4"] = { buildhash = "5b4ee7b727764ece8aa3e149603cfc7a", repo = { branch = "master", @@ -21,7 +21,7 @@ }, version = "1.16.4" }, - ["cmake#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["cmake#31fecfc4"] = { buildhash = "a6d18f8c0bf347d980f8bb762583c91a", repo = { branch = "master", @@ -30,7 +30,7 @@ }, version = "3.21.0" }, - ["gmp#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["gmp#31fecfc4"] = { buildhash = "7dd9c224447e46698ac73d29f58b1d73", repo = { branch = "master", @@ -39,7 +39,7 @@ }, version = "6.2.1" }, - ["libisl 0.22#671145042a9f4a96a5387ebff97a207d"] = { + ["libisl 0.22#67114504"] = { buildhash = "f649e1fb365e442e8f79f372fd91483b", repo = { branch = "master", @@ -48,7 +48,7 @@ }, version = "0.22" }, - ["libogg#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["libogg#31fecfc4"] = { buildhash = "d894fc29f2fb4c45a0f48bc2c6ece273", repo = { branch = "master", @@ -57,7 +57,7 @@ }, version = "v1.3.4" }, - ["libplist#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["libplist#31fecfc4"] = { buildhash = "0c01b22920be4876b1de74629194eb8f", repo = { branch = "master", @@ -66,7 +66,7 @@ }, version = "2.2.0" }, - ["libtool#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["libtool#31fecfc4"] = { buildhash = "64584ec84a4743ecb740b598b263ffa6", repo = { branch = "master", @@ -75,7 +75,7 @@ }, version = "2.4.6" }, - ["m4#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["m4#31fecfc4"] = { buildhash = "fd0e83e5759b442a970327ebb1c89793", repo = { branch = "master", @@ -84,7 +84,7 @@ }, version = "1.4.19" }, - ["muslcc#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["muslcc#31fecfc4"] = { buildhash = "11062c09ebeb484594488ad73ddbcd1f", repo = { branch = "master", @@ -93,7 +93,7 @@ }, version = "20210202" }, - ["pkg-config#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["pkg-config#31fecfc4"] = { buildhash = "84fd7f9b9f7a47709512cfc85cd9e5f7", repo = { branch = "master", @@ -102,7 +102,7 @@ }, version = "0.29.2" }, - ["zlib#31fecfc4f022419cba33d3f9fc3cc783"] = { + ["zlib#31fecfc4"] = { buildhash = "be90a245b8bb48e6b08a1a15bdcad467", repo = { branch = "master", diff --git a/xmake/modules/private/action/require/impl/utils/requirekey.lua b/xmake/modules/private/action/require/impl/utils/requirekey.lua index 230a53acb..d1792e50c 100644 --- a/xmake/modules/private/action/require/impl/utils/requirekey.lua +++ b/xmake/modules/private/action/require/impl/utils/requirekey.lua @@ -51,9 +51,9 @@ function main(requireinfo, opt) end if opt.hash then if key == "" then - key = "_" + key = "_" -- we need generate a fixed hash value end - return hash.uuid(key):gsub("%-", ""):lower() + return hash.uuid(key):split("-", {plain = true})[1]:lower() else return key end |
