Refactoring and introducing tool manager for linux#588
Open
Eashan-H wants to merge 8 commits into
Open
Conversation
…ture/tool-manager-integration
…installation worker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the Tool Manager to use a platform-specific backend architecture and introduces a dedicated Linux backend for native tool management. Platform-dependent logic has been separated into backend modules, making the codebase cleaner, easier to maintain, and easier to extend to additional operating systems.
The Linux backend supports native tool check, install, update, and uninstall operations on Debian/Ubuntu (APT), Fedora/RHEL (DNF), openSUSE (Zypper), and Arch Linux (Pacman). The Tool Manager now delegates platform-specific operations to the appropriate backend while preserving the existing GUI workflow.
Changes
Refactoring
Platform-specific Tool Manager logic has been moved into dedicated backend modules.
A common abstraction layer now allows the GUI to interact with the appropriate backend regardless of the host operating system.
main.pyhas been simplified by delegating platform-specific operations to backend implementations, providing a scalable foundation for future Windows and macOS support.New File:
src/toolManager/tool_manager_linux.pyA self-contained CLI backend responsible for Linux package management.
Supports automatic detection of APT, DNF, Zypper, and Pacman.
Uses a
PACKAGE_MAPdictionary to translate logical tool names such asngspice,kicad, andverilatorinto the correct distribution-specific package names.Detects WSL environments and adapts privilege escalation accordingly.
Uses
pkexecwhen available in graphical environments and falls back tosudo -Sfor WSL and headless systems.Avoids using
pkexecwhen no D-Bus or PolicyKit agent is available.Resolves binaries safely under WSL by ignoring Windows executables mounted under
/mnt.Serializes APT operations using
fcntl.flockto prevent concurrent package manager conflicts.Streams package manager output in real time so installation progress is visible in the GUI.
Implements
check,install,update, anduninstalloperations.