Closed engelmi closed 7 months ago
Hello, I'm afraid this is an unexpected side effect of us recently identifying /usr/bin/flock
as an essential requirement for running tests :/ As we discovered, /usr/bin/flock
is not available by default in every distro we use, which means tmt needs to check for it & install it if necessary. In this sense, a package manager became part of the process so early.
For 1.32, I'd like to finish a refactoring of package manager implementations, https://github.com/teemtee/tmt/pull/2557, and it covers Ubuntu and other distros with apt
. We can improve the error message for unsupported ones, and improve the behavior when an unsupported package manager is encountered. tmt can always display a warning, for example, "failed to install essential requirements, you're on your own", instead of crashing.
I believe this has been covered by the new package manager implementation:
Verified with the following plan
provision:
how: container
image: ubuntu
prepare:
how: shell
script: apt update
execute:
how: tmt
script: bash --version
For ubuntu
the current limitation is that apt update
has to be explicitly called by the user.
Describe the bug
In BlueChi we use tmt to run our integration tests in the GitHub CI on Ubuntu (since this is the only linux OS supported there). Since the new release 1.31.0 those tests keep failing due to
Package manager "None" is not supported.
in the prepare step:We are using the following plan: https://github.com/eclipse-bluechi/bluechi/blob/main/tests/plans/tier0.fmf
Note:
After briefly investigating, I found that
/usr/bin/flock
is automatically added as a required dependency (added in https://github.com/teemtee/tmt/pull/2622). And when tmt tries to install it on the local host (due to theprovision: how: local
) it first determines the package manager - which throws the"None" package manager not supported
error.To Reproduce
On any OS with a package manager not supported (see list in code), e.g. Ubuntu, then execute a
tmt run
on a plan withIt will automatically add
/usr/bin/flock
as a required dependency, try to install it on the local host and when determining the package manager throw the error forNone
package manager not supported.Expected behavior
Ideally, we could use tmt 1.31 on hosts with an OS that doesn't use any of the package managers in the list of supported ones, e.g. Ubuntu.
Is it possible to skip or not add this automatically generated preparation step in those cases?
Note: We currently mitigate this by pinning the version to 1.30.