Add APT, DNF, and Pacman package managers for Linux#4606
Merged
Gabriel Dufresne (GabrielDuf) merged 7 commits intomainfrom Apr 17, 2026
Merged
Add APT, DNF, and Pacman package managers for Linux#4606Gabriel Dufresne (GabrielDuf) merged 7 commits intomainfrom
Gabriel Dufresne (GabrielDuf) merged 7 commits intomainfrom
Conversation
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
April 17, 2026 17:10
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds native Linux package manager integration to the PackageEngine (APT/DNF/Pacman), wires the managers into PEInterface with basic distro-family detection, and updates elevation behavior/resources to support Linux workflows (including new SVG icons and icon registration).
Changes:
- Introduces three new PackageEngine manager projects: Apt, Dnf (incl. dnf5 discovery), and Pacman, each with details/operation helpers.
- Registers the new managers and icons via
PEInterfaceandIconType, and adds corresponding SVG assets. - Adds Linux-aware elevation setup (sudo/pkexec discovery +
ElevatorArgs) and adjusts operation argument building / admin-rights caching behavior.
Reviewed changes
Copilot reviewed 24 out of 27 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/UniGetUI/Assets/Symbols/pacman.svg | Adds Pacman SVG symbol asset |
| src/UniGetUI/Assets/Symbols/dnf.svg | Adds DNF SVG symbol asset |
| src/UniGetUI/Assets/Symbols/apt.svg | Adds APT SVG symbol asset |
| src/UniGetUI.sln | Adds new manager projects to the solution and config mappings |
| src/UniGetUI.PackageEngine.PackageEngine/UniGetUI.PackageEngine.PEInterface.csproj | References new manager projects for non-Windows builds |
| src/UniGetUI.PackageEngine.PackageEngine/PEInterface.cs | Registers Apt/Dnf/Pacman managers and adds Linux distro-family detection |
| src/UniGetUI.PackageEngine.Operations/SourceOperations.cs | Adjusts elevation caching trigger and prepends ElevatorArgs to elevated commands |
| src/UniGetUI.PackageEngine.Operations/PackageOperations.cs | Adjusts elevation caching trigger and prepends ElevatorArgs to elevated commands |
| src/UniGetUI.PackageEngine.Managers.Pacman/UniGetUI.PackageEngine.Managers.Pacman.csproj | New Pacman manager project |
| src/UniGetUI.PackageEngine.Managers.Pacman/Pacman.cs | Implements Pacman manager (discovery, listing, updates, index refresh) |
| src/UniGetUI.PackageEngine.Managers.Pacman/Helpers/PacmanPkgOperationHelper.cs | Pacman operation parameter generation |
| src/UniGetUI.PackageEngine.Managers.Pacman/Helpers/PacmanPkgDetailsHelper.cs | Pacman package details parsing/install location logic |
| src/UniGetUI.PackageEngine.Managers.Dnf/UniGetUI.PackageEngine.Managers.Dnf.csproj | New Dnf manager project |
| src/UniGetUI.PackageEngine.Managers.Dnf/Helpers/DnfPkgOperationHelper.cs | Dnf operation parameter generation |
| src/UniGetUI.PackageEngine.Managers.Dnf/Helpers/DnfPkgDetailsHelper.cs | Dnf package details parsing/install location logic |
| src/UniGetUI.PackageEngine.Managers.Dnf/Dnf.cs | Implements Dnf manager (dnf/dnf5 discovery, listing, updates, index refresh) |
| src/UniGetUI.PackageEngine.Managers.Apt/UniGetUI.PackageEngine.Managers.Apt.csproj | New Apt manager project |
| src/UniGetUI.PackageEngine.Managers.Apt/Helpers/AptPkgOperationHelper.cs | Apt operation parameter generation |
| src/UniGetUI.PackageEngine.Managers.Apt/Helpers/AptPkgDetailsHelper.cs | Apt package details parsing/install location logic |
| src/UniGetUI.PackageEngine.Managers.Apt/Apt.cs | Implements Apt manager (discovery, listing, updates, index refresh) |
| src/UniGetUI.Interface.Enums/Enums.cs | Registers new icon enum values (Apt/Dnf/Pacman) |
| src/UniGetUI.Core.Tools/Tools.cs | Extends admin-rights caching/reset logic for Linux elevators |
| src/UniGetUI.Core.LanguageEngine/Assets/Languages/lang_en.json | Adds English strings for manager descriptions (APT/DNF) |
| src/UniGetUI.Core.Data/CoreData.cs | Adds CoreData.ElevatorArgs for elevators needing extra flags (e.g., sudo -A) |
| src/UniGetUI.Avalonia/Views/Controls/Settings/SettingsPageButton.cs | Refactors icon path mapping helper |
| src/UniGetUI.Avalonia/ViewModels/DialogPages/ManageIgnoredUpdatesViewModel.cs | Adds icon name mapping for apt/dnf/pacman |
| src/UniGetUI.Avalonia/Infrastructure/AvaloniaBootstrapper.cs | Adds Linux elevation tool discovery (sudo+askpass preferred, pkexec fallback) |
Comments suppressed due to low confidence (3)
src/UniGetUI.PackageEngine.Operations/PackageOperations.cs:122
- On Linux this now always requests UAC/admin-rights caching whenever elevation is required. Combined with the current CacheUACForCurrentProcess implementation, this can attempt unsupported caching when the elevator is pkexec (or sudo without askpass), causing unnecessary prompts/failures. Consider only requesting caching when the selected elevator supports it (e.g., sudo with askpass/gsudo) or make CacheUACForCurrentProcess a safe no-op for unsupported elevators.
if (
OperatingSystem.IsLinux()
|| Settings.Get(Settings.K.DoCacheAdminRights)
|| Settings.Get(Settings.K.DoCacheAdminRightsForBatches)
)
{
RequestCachingOfUACPrompt();
src/UniGetUI.PackageEngine.Operations/SourceOperations.cs:130
- Same as PackageOperations: on Linux this always calls RequestCachingOfUACPrompt when elevation is required. If CoreData.ElevatorPath resolves to pkexec (or sudo without askpass), CacheUACForCurrentProcess may not be supported and can trigger extra prompts/failures. Please gate caching requests to elevators that actually support caching, or ensure caching is a safe no-op for pkexec.
if (
OperatingSystem.IsLinux()
|| Settings.Get(Settings.K.DoCacheAdminRights)
|| Settings.Get(Settings.K.DoCacheAdminRightsForBatches)
)
RequestCachingOfUACPrompt();
src/UniGetUI.PackageEngine.Operations/SourceOperations.cs:236
- Same issue as the earlier SourceOperations hunk: Linux always requests caching when elevated, which can break/annoy users when the configured elevator is pkexec or sudo without askpass. Gate caching requests to supported elevators or make caching a no-op for pkexec.
if (
OperatingSystem.IsLinux()
|| Settings.Get(Settings.K.DoCacheAdminRights)
|| Settings.Get(Settings.K.DoCacheAdminRightsForBatches)
)
RequestCachingOfUACPrompt();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Apr 17, 2026
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
Adds native Linux package manager support to UniGetUI via three new managers:
apt/apt-cache) — Debian/Ubuntu-based distributionsdnf/dnf5) — RHEL/Fedora-based distributions, with DNF5 (Fedora 41+) discoverypacman) — Arch Linux and derivativesAdds SVG icons for all three managers and registers them in
PEInterface.