From a5d26d70d99ff52a532dd37c80c434b38b792467 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 4 Feb 2023 20:39:27 +0800 Subject: improve package version #3333 --- xmake/core/package/package.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 078e7d534..15cfcd117 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1712,6 +1712,16 @@ function _instance:fetch(opt) -- save to cache self._FETCHINFO = fetchinfo + -- we need update the real version if it's system package + -- @see https://github.com/xmake-io/xmake/issues/3333 + if is_system and fetchinfo and fetchinfo.version then + local fetch_version = semver.new(fetchinfo.version) + if fetch_version then + self._VERSION = fetch_version + self._VERSION_STR = fetchinfo.version + end + end + -- mark as system package? if is_system ~= nil then self._is_system = is_system -- cgit v1.3.1