xbps icon indicating copy to clipboard operation
xbps copied to clipboard

lib/rpool.c: remove ENOTSUP error from xbps_rpool_foreach

Open Duncaen opened this issue 2 years ago • 1 comments

This error is already ignored by most callers and where it wasn't it masked the real error of packages simply not being found without repositories.

Fixes #454.

Duncaen avatar Dec 29 '21 12:12 Duncaen

Looking at how xbps_rpool_foreach is used, the human readable errors reported from its failure as Failed to initialize rpool is somewhat wrong, the function can either fail for that reason or because the callback function returned an error. I feel like this shouldn't happen, we should have a separate function to initialize the rpool and make xbps_rpool_foreach only return the callback functions return value, otherwise errors are impossible to identify at the caller.

Duncaen avatar Dec 29 '21 12:12 Duncaen