summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-08-28 23:48:09 +0800
committerruki <[email protected]>2018-08-28 16:48:56 +0800
commited0ef35cbcfd18ca2aaae716596506acd35b0333 (patch)
tree0692b7efc77f7e51e3f40ab00f0742570df9020b /xmake/core/package/package.lua
parentbf54580b06b259017f4a925aff5a58823f04f845 (diff)
remove load package from url
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua28
1 files changed, 0 insertions, 28 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 4a7a3ea18..52b4e374f 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -443,34 +443,6 @@ function package.cachedir()
return path.join(global.directory(), "cache", "packages")
end
--- load the package from the package url
-function package.load_from_url(packagename, packageurl)
-
- -- make a temporary package file
- local packagefile = os.tmpfile() .. ".lua"
-
- -- make package description
- local packagedata = string.format([[
- package("%s")
- set_urls("%s")
- ]], packagename, packageurl)
-
- -- write a temporary package description to file
- local ok, errors = io.writefile(packagefile, packagedata)
- if not ok then
- return nil, errors
- end
-
- -- load package instance
- local instance, errors = package.load_from_repository(packagename, false, nil, packagefile)
-
- -- remove the package file
- os.rm(packagefile)
-
- -- ok?
- return instance, errors
-end
-
-- load the package from the system directories
function package.load_from_system(packagename)