Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Duncaen
Copy link
Member

@Duncaen Duncaen commented Dec 29, 2021

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
Copy link
Member Author

Duncaen commented Dec 29, 2021

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 Duncaen force-pushed the xbps_rpool_foreach-ENOTSUP branch 2 times, most recently from adae0d1 to f96d97e Compare December 29, 2021 14:59
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 void-linux#454.
This parameter is unused and does not really belong belong in the
repository pool synchronization function, if there needs to be a way to
sync only specific repositories, a new function should be created for
that purposed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xbps-install: Print error message when dir in -r dir does not exist
1 participant