xbps_init: add a debug printf if repository array in conf file is empty.

This commit is contained in:
Juan RP
2011-06-04 15:08:50 +02:00
parent 36346a7ca0
commit 47e3a3f39b
2 changed files with 10 additions and 5 deletions

View File

@ -82,7 +82,10 @@ xbps_init(struct xbps_handle *xh)
* Initialize repository pool.
*/
if ((rv = xbps_repository_pool_init()) != 0) {
if (rv != ENOENT) {
if (rv == ENOTSUP) {
xbps_dbg_printf("%s: empty repository list.\n",
__func__);
} else if (rv != ENOENT && rv != ENOTSUP) {
xbps_dbg_printf("%s: couldn't initialize "
"repository pool: %s\n", strerror(rv));
xbps_end();