Fix duplicate recipe filenames by adding hardware-support, guest-agents, and hypervisor-type suffixes
Previously, list modifiers like hardware-support, guest-agents, and hypervisor-type created multiple variants but overwrote the same filenames. Now: 1. Add '_hw' suffix when hardware-support is enabled 2. Add '_ga' suffix when guest-agents is enabled 3. Add CPU type (amdcpu, intelcpu) suffix for hypervisor variants 4. Normalize modifier names from hypervisor-type to hypervisor_type This ensures all 144 recipes have unique filenames.
This commit is contained in:
@@ -473,12 +473,14 @@ class RecipeGenerator:
|
||||
if variant_subname and variant_subname in ['desktop', 'server', 'hypervisor', 'hypervisor-desktop']:
|
||||
parts.append(variant_subname)
|
||||
|
||||
# Add hypervisor-type (list or single value for filename)
|
||||
# Add hypervisor-type suffix (list or single value)
|
||||
if modifiers.get('hypervisor_type'):
|
||||
ht = modifiers['hypervisor_type']
|
||||
if isinstance(ht, list):
|
||||
parts.extend(ht)
|
||||
else:
|
||||
for h in ht:
|
||||
if h:
|
||||
parts.append(h)
|
||||
elif ht:
|
||||
parts.append(ht)
|
||||
|
||||
# Add desktop (non-GNOME only, since GNOME is default)
|
||||
@@ -496,6 +498,14 @@ class RecipeGenerator:
|
||||
if modifiers.get('storage') == 'encrypted':
|
||||
parts.append('encrypted')
|
||||
|
||||
# Add hardware-support suffix (hw when enabled)
|
||||
if modifiers.get('hardware-support') is True:
|
||||
parts.append('hw')
|
||||
|
||||
# Add guest-agents suffix (ga when enabled)
|
||||
if modifiers.get('guest-agents') is True:
|
||||
parts.append('ga')
|
||||
|
||||
return '_'.join(parts) + '.cfg'
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user