Fix an opaque I/O error by installing eulas
Problem
In api-v2, agama-web-server crashes at startup with
Error: I/O error
(tested via /testing_using_container.sh)
Cc @ancorgs @jreidinger
Solution
- install the files it is looking for (But are they the right files? The dir content looks patchy!)
- Improve the error message
- by using fs-err, a NEAT library that provides filenames to ALL such errors (once we
useit)
- by using fs-err, a NEAT library that provides filenames to ALL such errors (once we
Error: I/O error: failed to read directory
/usr/share/agama/eula: No such file or directory (os error 2)
Testing
- Tested manually
- There already were unit tests for this, using the files directly from the git tree. Unit but not integration.
Screenshots
No
Documentation
Not crashing is expected
@imobachgs even better solution than what we discussed
@mvidner please fix also https://github.com/agama-project/agama/blob/993bcea4ff02ade17d770b81760fd37e8518aacd/rust/agama-lib/src/error.rs#L76
@imobachgs says that in the past we had a problem with error messages appearing twice in the error cause chain: https://github.com/agama-project/agama/pull/660 , that is a thing to keep an eye out for
But in this case I saw the actual messages in journalctl output, the {0} is needed here.