insights-core
insights-core copied to clipboard
Extractors have silent dependencies
The ZipExtractor and TarExtractor classed depend on external tools: unzip and tar respectively. It‘s hard not to have tar installed, but for unzip this can happen quite easily. Both are dependencies nevertheless and insights-core can be installed and run without them.
I‘d like to suggest following measures:
- Check for those dependencies in the setup script and warn if they are not satisfied.
- Check for the dependencies either on runs that use the aforementioned classes, or maybe on all runs, and fail gracefully. * Check for the dependencies in tests and mark them as skipped if they can‘t be run.
- List the requirements in the RPM spec file. tar is already there, unzip isn’t.
The RPM spec should be sufficient for the usage in the wild. The runtime checks are useful for development and testing. It’s perfectly possible to run parts of insights-core or its tests without having the insights-client RPM installed. Some tests fail if the dependency is not fulfilled.
Related to #1372.