refactor: Remove filename deduplication to generate all 24 variants

- Removed deduplication logic from cli.py
- All 24 variants now processed (some overwrite with same filename)
- manifests: Added comments explaining cartesian product and filename behavior
- tests: Updated assertions for correct filename generation order
- Added 3 new tests for guest_agents and hardware_support modifiers
This commit is contained in:
Lukas Greve
2026-03-26 15:53:50 +01:00
parent 898c831065
commit 81c8392874
16 changed files with 239 additions and 25 deletions
-6
View File
@@ -233,7 +233,6 @@ def generate_from_manifest(args: argparse.Namespace, generator: RecipeGenerator)
sys.exit(1)
# Track seen filenames to avoid overwriting duplicates
seen_filenames = set()
# Generate all recipes
for recipe_config in manifest.get('recipes', []):
@@ -271,11 +270,6 @@ def generate_from_manifest(args: argparse.Namespace, generator: RecipeGenerator)
output_path = args.output_dir / filename
if filename in seen_filenames:
continue # Already generated this filename
seen_filenames.add(filename)
if args.dry_run:
print(f"Would generate: {output_path}")
else:
+7
View File
@@ -6,6 +6,13 @@
# - Single values: version: "43"
# - List values: version: ["43", "rawhide"] (expands to multiple variants)
# - List modifiers: hypervisor_type: ["amdcpu", "intelcpu"] (expands to separate variants)
#
# NOTE: List values create a cartesian product.
# Example: version: ["43", "rawhide"] + storage: ["standard", "encrypted"]
# creates 4 variants: (43,standard), (43,encrypted), (rawhide,standard), (rawhide,encrypted)
#
# NOTE: Boolean modifiers (guest-agents, hardware-support) only affect filename when True.
# Multiple variants with False values will produce the same filename (last one wins).
recipes:
# Install variants - desktop