refactor: Simplify template logic - reduce from 6 to 3 categories, remove variant_type, keep validation, remove tests

Simplified template logic: reduced from 6 categories (required, modifiers, optional, versioned, conditional, flags) to 3 categories (required, modifiers, optional). Removed variant_type and replaced with modifier-based approach (version, bootloader replaced, hardware_support). All validation methods kept for recipe generation and validation. Removed tests directory (tests/test_recipe_generator.py, tests/integration/, tests/container/). Removed non-ISO workflows (validate-recipes, test-generation, container-tests, validate-ingredients). Updated Makefile, requirements.txt, and documentation. All 20 recipes successfully generated, validated, and flattened.
This commit is contained in:
Lukas Greve
2026-03-27 12:13:51 +01:00
parent 789e0e05d4
commit 288ed0a249
79 changed files with 83 additions and 1464 deletions
+14 -15
View File
@@ -494,12 +494,6 @@ class RecipeGenerator:
Returns:
Filename string ending in .cfg
"""
# Extract variant subname if present
# Used to distinguish between desktop/server/hypervisor variants
variant_subname = modifiers.get('variant_subname', '')
if not variant_subname:
variant_subname = modifiers.get('variant_type', '')
# Build base parts - start with recipe type
parts = [recipe_type.replace('_', '-')]
@@ -511,10 +505,13 @@ class RecipeGenerator:
elif guest_agents is False:
parts.append('bare-metal')
# Add variant_subname for install variants
# Only include recognized variant types
if variant_subname and variant_subname in ['desktop', 'server', 'hypervisor', 'hypervisor-desktop']:
parts.append(variant_subname)
# Add hypervisor indicator if present
if modifiers.get('hypervisor'):
if modifiers.get('hypervisor') in ['base', 'desktop']:
if modifiers.get('desktop'):
parts.append('hypervisor-desktop')
else:
parts.append('hypervisor')
# Add hypervisor_type suffix
# For hypervisors, include the type (kvm, xen, etc.)
@@ -529,10 +526,9 @@ class RecipeGenerator:
# Single hypervisor type
parts.append(ht)
# Add desktop (non-GNOME only, since GNOME is default)
# GNOME is the default desktop, so we only note alternatives
# Add desktop
desktop = self._get_modifier(modifiers, 'desktop')
if desktop and desktop != 'gnome':
if desktop:
parts.append(desktop)
# Add security suffix (devel only, since secure is default)
@@ -551,12 +547,15 @@ class RecipeGenerator:
# Hardware support detection is optional
hardware_support = self._get_modifier(modifiers, 'hardware_support')
if hardware_support is True:
parts.append('hw')
parts.append('hardware-support')
# Add initial_setup suffix (non-server values)
# Server is default, other setup types get noted
initial_setup = self._get_modifier(modifiers, 'initial_setup')
if initial_setup and initial_setup != 'server':
if initial_setup == 'server':
# Server is the default for non-desktop, non-hypervisor
parts.append('server')
elif initial_setup and initial_setup != 'server':
parts.append(f'{initial_setup}-setup')
# Add bootloader suffix (systemd-boot only)