refactor: remove runtime package installation from flash_windows - #209
Conversation
wimtools exfatprogs util-linux udev parted``` from `src/lufus/writing/windows/flash.py` so i don't burn my toes
|
Please ruff format your code. |
Some packages can be replaced with their Python alternative library, but I don't have enough experience with them to implement them reliably. LLM used: QWEN3.5 4B tools:
|
Refactor: Remove runtime package installation from flash_windows
Target branch:
devLabels:
refactor,bug-fixSummary
Removed all runtime package installation logic from
flash_windows.py. Tools likentfs-3g,wimtools, andexfatprogsare now declared as system dependencies and expected to be present at runtime. Missing tools now raise a cleanFileNotFoundErrorwith a human-readable install hint instead of silently attempting installs.Changes
_find_ntfs_tool()— removedapt/dnf/pacman/zypperinstall logic, removed unusedstatus_cbparameter, now raisesFileNotFoundErrorif no tool is found_ensure_wimlib()→ renamed to_check_wimlib()— removed all install logic, now only checks for presence and raises on missrequirements-system.txtdeclaring:ntfs-3g,wimtools,exfatprogs,util-linux,udev,partedcontextlibimportNo changes to
requirements-python.txt— this file has no third-party Python dependencies.Before & After
Before (silent install attempt):
After (clean error):
Known Limitations
uefi-ntfs.imgis still present — this is intentional and out of scope for this PRrequirements-system.txtpackage names follow Debian/Arch conventions; names may differ on RPM-based distros (e.g.exfatprogsvsexfat-utils)AI Disclosure
This PR description was Generated by Copilot.
Checklist
devbranch