void-linux / xbps

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

xbps-pkgdb prints weird error message when checking a package #351

Open ericonr opened 3 years ago

ericonr commented 3 years ago

I haven't investigated exactly why this happens, but:

# doas cp /bin/ls /bin/7z
# xbps-pkgdb p7zip
ERROR: p7zip: hash mismatch for /usr/bin/7z.
ERROR: p7zip: files check FAILED.
Failed to check `p7zip': Operation not permitted

The last part of the message seems to be passing a bad value to strerror.

ericonr commented 3 years ago

The error returned by check_pkg_integrity is 0 or 1, but it's printed by strerror(), which doesn't make sense. So just need to decide on the best way of showing this.