t/g/u/test_xen_guest_agent.py: Use yum on older distros or dnf if available - #582
t/g/u/test_xen_guest_agent.py: Use yum on older distros or dnf if available#582rzr wants to merge 1 commit into
Conversation
b71fee5 to
090a760
Compare
090a760 to
43945e8
Compare
|
I'm not sure what "from older distros" means here. |
Pre dnf ones :) |
|
It's the "from" part which I don't match with the contents of the change. |
On an Alma 10 (my XCP-ng 8.99 test deployment). So, yum is not supported anymore on newer distros. I believe we need a check whether yum or dnf exists.... |
43945e8 to
7fa099d
Compare
|
I began to implement a proper yum/dnf implementation as part of the XCP-ng 9 PR #570 |
…ilable
On some modern systems that uses dnf, there is a compatibility yum wrapper.
dnf5-5.2.18.0-4.fc43.x86_64 contains /sbin/yum
But not available in all dnf systems
dnf-4.20.0-14.el10_0.alma.1.noarch only contains /usr/bin/dnf
So we have to support both.
Some refactoring can be considered to support more package managers.
Observed issue was:
tests/guest_tools/unix/test_xen_guest_agent.py::TestXenGuestAgent::test_agent_running_after_reboot[...]
lib.commands.SSHCommandFailed: SSH command (dnf install -y xen-guest-agent) failed with return code 127: bash: dnf: command not found
Related-to: https://github.com/xcp-ng/xcp-ng-tests/pull/434/changes#r3395851769
Signed-off-by: Philippe Coval <philippe.coval@vates.tech>
7fa099d to
ba882b8
Compare
glehmann
left a comment
There was a problem hiding this comment.
I'm preparing a version with the package manager detection in the VM
|
See also #591 that introduces the dnf detection, and also fix the same problem than this PR |
|
This PR has 3 approvals. What's next? Does it compete with #591? If yes, did you decide how to solve it? |
|
Closing as #591 is merged and handles the dnf/yum differences |
On modern systems that uses dnf, there is a compatibility yum wrapper, some refactoring can be considered to support more package managers.
Observed issue was: