void-linux / xbps

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

Document and stabilize exit status #458

Open Duncaen opened 2 years ago

Duncaen commented 2 years ago

Currently xbps uses errnos as exit status, the actual error numbers are not actually defined by a standard so it would be good to switch those out for pre defined and documented numbers ("EXIT STATUS" sections in man pages).

When defining those numbers, we should keep them somewhat compatible with the current ones, especially for xbps-install and xbps-query as xbps-src and probably other scripts use those numbers.

leahneukirchen commented 2 years ago

We should also take this opportunity to add some exit statuses where 0 is returned currently, e.g. xbps-query -s fasdasd should not return 0. (Same for -x, -X. Returning 2 would be consistent with -f and the default behavior.)