xbps icon indicating copy to clipboard operation
xbps copied to clipboard

xbps-install -S exits with 0 despite ERROR (resolver failure)

Open foopub opened this issue 5 years ago • 6 comments

Should be easily reproduced if you change or delete your /etc/resolv.conf :

bash-5.0# xbps-install -Su
[*] Updating `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
ERROR: [reposync] failed to fetch file `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata': Transient resolver failure
bash-5.0# echo $?
0

foopub avatar Jun 13 '20 18:06 foopub

Could reproduce, I think we need to propagate this error somewhere, because xbps-install <package> without /etc/resolv.conf does error out.

ericonr avatar Jun 30 '20 17:06 ericonr

Its kinda hard, this is how we basically allow "fallback" servers and simplify the repository list in xbps-src by just providing all possible repository paths and even if the repository is not available for a specific architecture and returns 404, xbps will just continue.

Duncaen avatar Jun 30 '20 19:06 Duncaen

There is definitively room for improvement, but its not as simple as propagating the errors and exiting.

Duncaen avatar Jun 30 '20 19:06 Duncaen

I see. Could it be a matter of checking that no server answered at all, and then error out?

ericonr avatar Jun 30 '20 19:06 ericonr

Could it be a matter of checking that no server answered at all, and then error out?

This was brought up on #voidlinux, today. This was my thought, as well.

abenson avatar Jan 06 '21 16:01 abenson

Just faced this issue today, is there a fix for this?

ghost avatar Oct 25 '21 04:10 ghost