void-linux / xbps

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

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

Open foopub opened 4 years ago

foopub commented 4 years ago

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
ericonr commented 4 years ago

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

Duncaen commented 4 years ago

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

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

ericonr commented 4 years ago

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

abenson commented 3 years ago

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.

ghost commented 2 years ago

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