void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
821 stars 124 forks source link

lib/rpool.c: remove ENOTSUP error from xbps_rpool_foreach #456

Open Duncaen opened 2 years ago

Duncaen commented 2 years ago

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 commented 2 years ago

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.