xbps_repository_pool_init: return errno value if a repo sync fails.
This commit is contained in:
parent
6fe2c61c59
commit
12d488ec47
@ -110,10 +110,15 @@ xbps_repository_pool_init(void)
|
|||||||
/* file not found, fetch it */
|
/* file not found, fetch it */
|
||||||
xbps_printf("Synchronizing package index for "
|
xbps_printf("Synchronizing package index for "
|
||||||
"`%s'...\n", repouri);
|
"`%s'...\n", repouri);
|
||||||
if (xbps_repository_sync_pkg_index(repouri) == -1) {
|
rv = xbps_repository_sync_pkg_index(repouri);
|
||||||
xbps_error_printf("failed to fetch "
|
if (rv != 0) {
|
||||||
"pkg-index.plist for `%s': %s\n",
|
xbps_error_printf("failed to sync `%s'"
|
||||||
repouri, xbps_fetch_error_string());
|
": %s %s\n",
|
||||||
|
repouri, strerror(errno),
|
||||||
|
xbps_fetch_error_string());
|
||||||
|
rv = errno;
|
||||||
|
free(plist);
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user