void-linux / xbps

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

bin/xbps-pkgdb: use -errno values for error states #552

Closed classabbyamp closed 1 year ago

classabbyamp commented 1 year ago

Use -errno values for error states when checking a package. This will give more relevant information than before, removes a message that is misleading in many cases, and allows for some minor simplification.

before:

$ doas xbps-pkgdb runit-void; echo $?
ERROR: runit-void: hash mismatch for /etc/runit/2.
ERROR: runit-void: files check FAILED.
Failed to check `runit-void': Operation not permitted
1

after:

$ doas xbps-pkgdb runit-void; echo $?
ERROR: runit-void: hash mismatch for /etc/runit/2.
ERROR: runit-void: files check FAILED.
1

this does not change the behaviour of xbps-pkgdb -a.


second commit is an unrelated change, but this is the first time CI has been run on clang 15 so it was caught there.