aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormpeterv <mpeterval@gmail.com>2016-03-19 13:34:23 +0300
committermpeterv <mpeterval@gmail.com>2016-03-19 13:34:23 +0300
commitca60d34cf161e778bd4df7d79cda6df479df20ca (patch)
tree9527c669a6a4b78421bb6ebec64f91753d1a6f64 /src
parent36a8d977dd2eb5d15aa4635d779b44d820f60790 (diff)
downloadluarocks-ca60d34cf161e778bd4df7d79cda6df479df20ca.tar.gz
luarocks-ca60d34cf161e778bd4df7d79cda6df479df20ca.tar.bz2
luarocks-ca60d34cf161e778bd4df7d79cda6df479df20ca.zip
Doc fixes for luarocks.search
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/search.lua18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/luarocks/search.lua b/src/luarocks/search.lua
index f1a82d5b..32af1f9e 100644
--- a/src/luarocks/search.lua
+++ b/src/luarocks/search.lua
@@ -48,7 +48,8 @@ end
48 48
49--- Store a search result (a rock or rockspec) in the results table. 49--- Store a search result (a rock or rockspec) in the results table.
50-- @param results table: The results table, where keys are package names and 50-- @param results table: The results table, where keys are package names and
51-- versions are tables matching version strings to an array of servers. 51-- values are tables matching version strings to arrays of
52-- tables with fields "arch" and "repo".
52-- @param name string: Package name. 53-- @param name string: Package name.
53-- @param version string: Package version. 54-- @param version string: Package version.
54-- @param arch string: Architecture of rock ("all", "src" or platform 55-- @param arch string: Architecture of rock ("all", "src" or platform
@@ -92,7 +93,8 @@ end
92-- table, optionally checking if version and arch (if given) match 93-- table, optionally checking if version and arch (if given) match
93-- a query. 94-- a query.
94-- @param results table: The results table, where keys are package names and 95-- @param results table: The results table, where keys are package names and
95-- versions are tables matching version strings to an array of servers. 96-- values are tables matching version strings to arrays of
97-- tables with fields "arch" and "repo".
96-- @param repo string: URL or pathname of the repository. 98-- @param repo string: URL or pathname of the repository.
97-- @param name string: The name of the package being tested. 99-- @param name string: The name of the package being tested.
98-- @param version string: The version of the package being tested. 100-- @param version string: The version of the package being tested.
@@ -123,8 +125,9 @@ end
123-- matches regardless of architecture. 125-- matches regardless of architecture.
124-- @param results table or nil: If given, this table will store the 126-- @param results table or nil: If given, this table will store the
125-- results; if not given, a new table will be created. 127-- results; if not given, a new table will be created.
126-- @param table: The results table, where keys are package names and 128-- @return table: The results table, where keys are package names and
127-- versions are tables matching version strings to an array of servers. 129-- values are tables matching version strings to arrays of
130-- tables with fields "arch" and "repo".
128-- If a table was given in the "results" parameter, that is the result value. 131-- If a table was given in the "results" parameter, that is the result value.
129function search.disk_search(repo, query, results) 132function search.disk_search(repo, query, results)
130 assert(type(repo) == "string") 133 assert(type(repo) == "string")
@@ -157,7 +160,8 @@ end
157 160
158--- Perform search on a rocks server or tree. 161--- Perform search on a rocks server or tree.
159-- @param results table: The results table, where keys are package names and 162-- @param results table: The results table, where keys are package names and
160-- versions are tables matching version strings to an array of servers. 163-- values are tables matching version strings to arrays of
164-- tables with fields "arch" and "repo".
161-- @param repo string: The URL of a rocks server or 165-- @param repo string: The URL of a rocks server or
162-- the pathname of a rocks tree (as returned by path.rocks_dir()). 166-- the pathname of a rocks tree (as returned by path.rocks_dir()).
163-- @param query table: A table describing the query in dependency 167-- @param query table: A table describing the query in dependency
@@ -190,8 +194,8 @@ end
190--- Search on all configured rocks servers. 194--- Search on all configured rocks servers.
191-- @param query table: A dependency query. 195-- @param query table: A dependency query.
192-- @return table: A table where keys are package names 196-- @return table: A table where keys are package names
193-- and values are tables matching version strings to an array of 197-- and values are tables matching version strings to arrays of
194-- rocks servers; if no results are found, an empty table is returned. 198-- tables with fields "arch" and "repo".
195function search.search_repos(query) 199function search.search_repos(query)
196 assert(type(query) == "table") 200 assert(type(query) == "table")
197 201