Quantcast
Channel: Pacman issues
Viewing all articles
Browse latest Browse all 109

_alpm_temporary_download_dir_setup does not log errors.

$
0
0
While finally updating some personal software utilizing libalpm to a current version of the library, I just got bitten by the fact that `_alpm_temporary_download_dir_setup` does check errors of `mkdtemp` and `chown`, but does neither log them nor set `pm_errno` on the handle. On the one hand this resulted in more debugging effort than expected to figure out that libalpm tried to write to `/tmp` which was not writable in the context my code was running in (obviously a bug on my end). And on the other hand it resulted in the `libalpm` rust wrapper crashing as it made the assumption that a negative return value from `alpm_trans_commit` always means `pm_errno` is set (I opened an [issue](https://github.com/archlinux/alpm.rs/issues/51) over there letting them know as well). After all this, I do not have an immediate issue anymore, but reworking error handling for those cases might be useful to spare other people from having to do the same work I just did :)

Viewing all articles
Browse latest Browse all 109

Trending Articles