This commit is contained in:
Juan RP 2014-10-07 09:18:28 +02:00
parent 680abe50e7
commit ec438c36f9

View File

@ -152,10 +152,9 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter)
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD, 0, pkgver,
"Downloading `%s' package (from `%s')...", pkgver, repoloc);
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
rv = errno;
rv = fetchLastErrCode ? fetchLastErrCode : errno;
fetchstr = xbps_fetch_error_string();
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL, rv,
pkgver, "[trans] failed to download `%s' package from `%s': %s",
pkgver, repoloc, fetchstr ? fetchstr : strerror(rv));
free(file);
@ -174,10 +173,9 @@ download_binpkgs(struct xbps_handle *xhp, xbps_object_iterator_t iter)
"Downloading `%s' signature (from `%s')...", pkgver, repoloc);
file = xbps_xasprintf("%s/%s.%s.xbps.sig", repoloc, pkgver, arch);
if ((rv = xbps_fetch_file(xhp, file, NULL)) == -1) {
rv = errno;
rv = fetchLastErrCode ? fetchLastErrCode : errno;
fetchstr = xbps_fetch_error_string();
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL,
fetchLastErrCode != 0 ? fetchLastErrCode : errno,
xbps_set_cb_state(xhp, XBPS_STATE_DOWNLOAD_FAIL, rv,
pkgver, "[trans] failed to download `%s' signature from `%s': %s",
pkgver, repoloc, fetchstr ? fetchstr : strerror(rv));
free(sigfile);