Verified Commit 1bb45704 authored by Karel Koci's avatar Karel Koci 🤘
Browse files

Merge branch 'v69.1.3'

parents 7a82e5b3 e84fce9b
Pipeline #83745 passed with stages
in 3 minutes and 6 seconds
......@@ -63,10 +63,12 @@ valgrind-memcheck:
lint-c:
extends: .test
allow_failure: true
script:
- make lint-c
lint-lua:
extends: .test
allow_failure: true
script:
- make lint-lua
......@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for `FilesSignature` field in packages. On mismatch it trigger
reinstall.
## [69.1.3] - 2021-06-16
### Changed
- Error generated from Lua when URI is being finished now includes error message
from downloader if it was download failure.
## [69.1.2] - 2021-05-28
### Fixed
- Immediate reboot not being performed when combined with replan that actually
......
AC_INIT([updater-ng], [69.1.2], [tech.support@turris.cz])
AC_INIT([updater-ng], [69.1.3], [tech.support@turris.cz])
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([foreign silent-rules subdir-objects -Wall -Wno-portability])
......
......@@ -214,15 +214,20 @@ static int lua_uri_finish(lua_State *L) {
struct uri_lua *uri = luaL_checkudata(L, 1, URI_META);
const uint8_t *buf;
size_t len;
if (!uri_finish(uri->uri, &buf, &len)) {
if (uri_errno == URI_E_SIG_FAIL) {
return luaL_error(L, "Unable to finish URI (%s): %s: %s: %s",
uri_uri(uri->uri), uri_error_msg(uri_errno),
uri_uri(uri_sub_err_uri), uri_error_msg(uri_sub_errno));
} else
return luaL_error(L, "Unable to finish URI (%s): %s",
uri_uri(uri->uri), uri_error_msg(uri_errno));
}
if (!uri_finish(uri->uri, &buf, &len))
switch (uri_errno) {
case URI_E_DOWNLOAD_FAIL:
return luaL_error(L, "Unable to finish URI (%s): %s: %s",
uri_uri(uri->uri), uri_error_msg(uri_errno),
uri_download_error(uri->uri));
case URI_E_SIG_FAIL:
return luaL_error(L, "Unable to finish URI (%s): %s: %s: %s",
uri_uri(uri->uri), uri_error_msg(uri_errno),
uri_uri(uri_sub_err_uri), uri_error_msg(uri_sub_errno));
default:
return luaL_error(L, "Unable to finish URI (%s): %s",
uri_uri(uri->uri), uri_error_msg(uri_errno));
}
if (!buf)
return 0;
lua_pushlstring(L, (const char*)buf, len);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment