diff options
| author | ruki <[email protected]> | 2021-06-02 23:33:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-06-02 23:33:26 +0800 |
| commit | bccbaae0a466152fa648ed10156fb6295c862c37 (patch) | |
| tree | ab6bb7cec9d359b6cb2ff92e3709863ce6ad2a6d | |
| parent | 76a7ac04e4a1a07347fd1fb6bc43374e2ff88dc6 (diff) | |
fix fetch package
| -rw-r--r-- | xmake/actions/package/local/main.lua | 4 | ||||
| -rw-r--r-- | xmake/actions/package/remote/main.lua | 2 | ||||
| -rw-r--r-- | xmake/core/package/package.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/private/action/require/impl/repository.lua | 8 |
4 files changed, 5 insertions, 13 deletions
diff --git a/xmake/actions/package/local/main.lua b/xmake/actions/package/local/main.lua index 28d235126..75c6b4d72 100644 --- a/xmake/actions/package/local/main.lua +++ b/xmake/actions/package/local/main.lua @@ -63,7 +63,7 @@ function _package_binary(target) file:print(" set_license(\"%s\")", target:license()) end if #deps > 0 then - file:print(" set_deps(\"%s\")", table.concat(deps, "\", \"")) + file:print(" add_deps(\"%s\")", table.concat(deps, "\", \"")) end file:print("") file:print([[ @@ -145,7 +145,7 @@ function _package_library(target) file:print(" set_license(\"%s\")", target:license()) end if #deps > 0 then - file:print(" set_deps(\"%s\")", table.concat(deps, "\", \"")) + file:print(" add_deps(\"%s\")", table.concat(deps, "\", \"")) end file:print("") file:print([[ diff --git a/xmake/actions/package/remote/main.lua b/xmake/actions/package/remote/main.lua index 6b108e60e..0e8383890 100644 --- a/xmake/actions/package/remote/main.lua +++ b/xmake/actions/package/remote/main.lua @@ -59,7 +59,7 @@ function _package_remote(target) file:print(" set_license(\"%s\")", target:license()) end if #deps > 0 then - file:print(" set_deps(\"%s\")", table.concat(deps, "\", \"")) + file:print(" add_deps(\"%s\")", table.concat(deps, "\", \"")) end file:print("") local url = option.get("url") or "https://github.com/myrepo/foo.git" diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 72d8aa5f5..d68bcff57 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -1234,7 +1234,7 @@ function _instance:fetch(opt) if self:is_binary() then -- only fetch it from the xmake repository first - if not fetchinfo and system ~= true and not self:is_thirdparty() and not self:is_fetchonly() then + if not fetchinfo and system ~= true and not self:is_thirdparty() then fetchinfo = self:_fetch_tool({require_version = self:version_str(), force = opt.force}) if fetchinfo then is_system = self._is_system @@ -1251,7 +1251,7 @@ function _instance:fetch(opt) else -- only fetch it from the xmake repository first - if not fetchinfo and system ~= true and not self:is_thirdparty() and not self:is_fetchonly() then + if not fetchinfo and system ~= true and not self:is_thirdparty() then fetchinfo = self:_fetch_library({require_version = self:version_str(), external = external, force = opt.force}) if fetchinfo then is_system = self._is_system diff --git a/xmake/modules/private/action/require/impl/repository.lua b/xmake/modules/private/action/require/impl/repository.lua index 6a0471f8b..f997ee703 100644 --- a/xmake/modules/private/action/require/impl/repository.lua +++ b/xmake/modules/private/action/require/impl/repository.lua @@ -70,17 +70,9 @@ function packagedir(packagename, reponame) break end end - - -- found? if foundir then - - -- save package directory packagedirs[packagename] = foundir - - -- update cache _g._PACKAGEDIRS = packagedirs - - -- ok return foundir[1], foundir[2] end end |
