diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2017-12-19 12:25:16 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2017-12-19 12:25:16 -0200 |
commit | cef3203f735103a2e0e1ddefdf8686c94c712ec9 (patch) | |
tree | cdfd4766593161b3585d681c5a8982170b5552b5 | |
parent | fd4cdba61e51a949b56fa94591d06cb21b906b98 (diff) | |
download | luarocks-cef3203f735103a2e0e1ddefdf8686c94c712ec9.tar.gz luarocks-cef3203f735103a2e0e1ddefdf8686c94c712ec9.tar.bz2 luarocks-cef3203f735103a2e0e1ddefdf8686c94c712ec9.zip |
Use util.warning instead of printerr with "Warning: "
-rw-r--r-- | src/luarocks/build.lua | 2 | ||||
-rw-r--r-- | src/luarocks/cmd/install.lua | 2 | ||||
-rw-r--r-- | src/luarocks/cmd/new_version.lua | 4 | ||||
-rw-r--r-- | src/luarocks/core/vers.lua | 2 | ||||
-rw-r--r-- | src/luarocks/fs/lua.lua | 2 | ||||
-rw-r--r-- | src/luarocks/fs/unix.lua | 2 | ||||
-rw-r--r-- | src/luarocks/repos.lua | 2 | ||||
-rw-r--r-- | src/luarocks/upload/api.lua | 2 |
8 files changed, 9 insertions, 9 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua index 74135379..e2419e55 100644 --- a/src/luarocks/build.lua +++ b/src/luarocks/build.lua | |||
@@ -180,7 +180,7 @@ function build.build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_m | |||
180 | end | 180 | end |
181 | 181 | ||
182 | if deps_mode == "none" then | 182 | if deps_mode == "none" then |
183 | util.printerr("Warning: skipping dependency checks.") | 183 | util.warning("skipping dependency checks.") |
184 | else | 184 | else |
185 | local ok, err, errcode = deps.fulfill_dependencies(rockspec, deps_mode) | 185 | local ok, err, errcode = deps.fulfill_dependencies(rockspec, deps_mode) |
186 | if err then | 186 | if err then |
diff --git a/src/luarocks/cmd/install.lua b/src/luarocks/cmd/install.lua index 8b4a154b..018e9246 100644 --- a/src/luarocks/cmd/install.lua +++ b/src/luarocks/cmd/install.lua | |||
@@ -66,7 +66,7 @@ function install.install_binary_rock(rock_file, deps_mode) | |||
66 | end | 66 | end |
67 | 67 | ||
68 | if deps_mode == "none" then | 68 | if deps_mode == "none" then |
69 | util.printerr("Warning: skipping dependency checks.") | 69 | util.warning("skipping dependency checks.") |
70 | else | 70 | else |
71 | ok, err, errcode = deps.check_external_deps(rockspec, "install") | 71 | ok, err, errcode = deps.check_external_deps(rockspec, "install") |
72 | if err then return nil, err, errcode end | 72 | if err then return nil, err, errcode end |
diff --git a/src/luarocks/cmd/new_version.lua b/src/luarocks/cmd/new_version.lua index 5149f924..f1181d40 100644 --- a/src/luarocks/cmd/new_version.lua +++ b/src/luarocks/cmd/new_version.lua | |||
@@ -59,7 +59,7 @@ end | |||
59 | local function check_url_and_update_md5(out_rs) | 59 | local function check_url_and_update_md5(out_rs) |
60 | local file, temp_dir = fetch.fetch_url_at_temp_dir(out_rs.source.url, "luarocks-new-version-"..out_rs.package) | 60 | local file, temp_dir = fetch.fetch_url_at_temp_dir(out_rs.source.url, "luarocks-new-version-"..out_rs.package) |
61 | if not file then | 61 | if not file then |
62 | util.printerr("Warning: invalid URL - "..temp_dir) | 62 | util.warning("invalid URL - "..temp_dir) |
63 | return true, false | 63 | return true, false |
64 | end | 64 | end |
65 | 65 | ||
@@ -118,7 +118,7 @@ local function update_source_section(out_rs, url, tag, old_ver, new_ver) | |||
118 | return nil, md5_changed | 118 | return nil, md5_changed |
119 | end | 119 | end |
120 | if md5_changed then | 120 | if md5_changed then |
121 | util.printerr("Warning: URL is the same, but MD5 has changed. Old rockspec is broken.") | 121 | util.warning("URL is the same, but MD5 has changed. Old rockspec is broken.") |
122 | end | 122 | end |
123 | return true | 123 | return true |
124 | end | 124 | end |
diff --git a/src/luarocks/core/vers.lua b/src/luarocks/core/vers.lua index 864cc5b5..c8c66a1f 100644 --- a/src/luarocks/core/vers.lua +++ b/src/luarocks/core/vers.lua | |||
@@ -115,7 +115,7 @@ function vers.parse_version(vstring) | |||
115 | -- extract a word | 115 | -- extract a word |
116 | token, rest = v:match("^(%a+)[%.%-%_]*(.*)") | 116 | token, rest = v:match("^(%a+)[%.%-%_]*(.*)") |
117 | if not token then | 117 | if not token then |
118 | util.printerr("Warning: version number '"..v.."' could not be parsed.") | 118 | util.warning("version number '"..v.."' could not be parsed.") |
119 | version[i] = 0 | 119 | version[i] = 0 |
120 | break | 120 | break |
121 | end | 121 | end |
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index 7b6505c2..8fe2466c 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua | |||
@@ -696,7 +696,7 @@ function fs_lua.download(url, filename, cache) | |||
696 | end | 696 | end |
697 | if https_err then | 697 | if https_err then |
698 | if not downloader_warning then | 698 | if not downloader_warning then |
699 | util.printerr("Warning: falling back to "..cfg.downloader.." - install luasec to get native HTTPS support") | 699 | util.warning("falling back to "..cfg.downloader.." - install luasec to get native HTTPS support") |
700 | downloader_warning = true | 700 | downloader_warning = true |
701 | end | 701 | end |
702 | return fs.use_downloader(url, filename, cache) | 702 | return fs.use_downloader(url, filename, cache) |
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua index 89e3ec73..daa60c15 100644 --- a/src/luarocks/fs/unix.lua +++ b/src/luarocks/fs/unix.lua | |||
@@ -104,7 +104,7 @@ function unix.is_actual_binary(filename) | |||
104 | local first = file:read(2) | 104 | local first = file:read(2) |
105 | file:close() | 105 | file:close() |
106 | if not first then | 106 | if not first then |
107 | util.printerr("Warning: could not read "..filename) | 107 | util.warning("could not read "..filename) |
108 | return true | 108 | return true |
109 | end | 109 | end |
110 | return first ~= "#!" | 110 | return first ~= "#!" |
diff --git a/src/luarocks/repos.lua b/src/luarocks/repos.lua index 1abb5628..c20d3589 100644 --- a/src/luarocks/repos.lua +++ b/src/luarocks/repos.lua | |||
@@ -300,7 +300,7 @@ function repos.deploy_files(name, version, wrap_bin_scripts, deps_mode) | |||
300 | backup = backup.."~" | 300 | backup = backup.."~" |
301 | until not fs.exists(backup) -- Slight race condition here, but shouldn't be a problem. | 301 | until not fs.exists(backup) -- Slight race condition here, but shouldn't be a problem. |
302 | 302 | ||
303 | util.printerr("Warning: "..suffixed_target.." is not tracked by this installation of LuaRocks. Moving it to "..backup) | 303 | util.warning(suffixed_target.." is not tracked by this installation of LuaRocks. Moving it to "..backup) |
304 | local move_ok, move_err = fs.move(suffixed_target, backup) | 304 | local move_ok, move_err = fs.move(suffixed_target, backup) |
305 | if not move_ok then return nil, move_err end | 305 | if not move_ok then return nil, move_err end |
306 | end | 306 | end |
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua index 99162e75..ff00850e 100644 --- a/src/luarocks/upload/api.lua +++ b/src/luarocks/upload/api.lua | |||
@@ -62,7 +62,7 @@ function Api:check_version() | |||
62 | return nil, "Your upload client is too out of date to continue, please upgrade LuaRocks." | 62 | return nil, "Your upload client is too out of date to continue, please upgrade LuaRocks." |
63 | end | 63 | end |
64 | if res.version ~= tool_version then | 64 | if res.version ~= tool_version then |
65 | util.printerr("Warning: Your LuaRocks is out of date, consider upgrading.") | 65 | util.warning("your LuaRocks is out of date, consider upgrading.") |
66 | end | 66 | end |
67 | end | 67 | end |
68 | return true | 68 | return true |