Commit eafcc87
committed
base_image: use guest OS detection for Debian-specific packages
The virt-builder template was using the distro_debian_based variable to
determine which packages to install in guest images, but this variable
reflects the host OS rather than the guest OS. This caused installation
failures when creating Fedora guests from a Debian host, as the template
attempted to install Debian-specific packages like isc-dhcp-client and
ifupdown on Fedora systems where they don't exist.
Replace the host OS check with proper guest OS detection using the
virtbuilder_os_version variable, which contains the actual guest OS name
like "fedora-41" or "debian-13". This ensures Debian-specific networking
packages and configuration only apply to Debian and Ubuntu guests regardless
of the host operating system.
Additionally, consolidate locale configuration by moving it from the
trixie-specific block to the general Debian block. This ensures all
Debian-based guests get proper locale setup during image build, not just
Debian Trixie. The locale commands (locale-gen, update-locale) are
Debian-specific and safe to run during virt-builder image creation for
any Debian-based distribution.
This change enables creation of fedora-41 guests from debian hosts without
package installation failures or incorrect network configuration.
Link: https://lore.kernel.org/all/[email protected]/ [1]
Fixes: 9822799 ("devconfig: drop locales-all leftovers")
Reported-by: Chuck Lever <[email protected]>
Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>1 parent ce060d3 commit eafcc87
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
46 | 53 | | |
47 | 54 | | |
48 | 55 | | |
| |||
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments