refactor: functional separation with deploy/, recipe-generator/, and bin/

- deploy/: deployment bash scripts (4 files)
- recipe-generator/: recipe generation tool (Python + YAML configs)
- bin/: executable wrappers (single generate-recipe entry point)
- Updated deploy.sh, README.md, DEVELOPMENT.md, DEVELOPMENT_QUICK.md
- Updated tests/test_recipe_generator.py and tests/integration/test_integration.py
- Updated CI workflow and Makefile paths
- All 41 tests pass
This commit is contained in:
Lukas Greve
2026-03-25 09:34:00 +01:00
parent 00c4356ff3
commit 3782777058
25 changed files with 55 additions and 51 deletions
@@ -0,0 +1,42 @@
import subprocess
import re
# Get all package names from your config file
packages = []
with open('core-packages-hardware-support.cfg', 'r') as f:
for line in f:
if line.strip() and not line.startswith('#') and '#' not in line:
# Extract package name (everything before the first space or #)
package = line.strip().split('#')[0].strip()
if package and not package.startswith('%'):
packages.append(package)
# Get summaries using dnf info
summaries = {}
for package in packages:
try:
result = subprocess.run(['dnf', 'info', package],
capture_output=True, text=True, timeout=30)
if result.returncode == 0:
# Extract summary line
summary_match = re.search(r'Summary\s*:\s*(.+)', result.stdout)
if summary_match:
summaries[package] = summary_match.group(1).strip()
except Exception as e:
print(f"Error getting info for {package}: {e}")
# Now you can generate your updated package list with summaries
with open('core-packages-hardware-support.cfg', 'r') as f:
lines = f.readlines()
new_lines = []
for line in lines:
if line.strip() and not line.startswith('#') and not line.startswith('%'):
package = line.strip().split('#')[0].strip()
if package in summaries:
line = f"{package} # {summaries[package]}\n"
new_lines.append(line)
# Write back to file (or save as new file)
with open('updated-packages.cfg', 'w') as f:
f.writelines(new_lines)