Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically recognize available package managers #187

Open
FrostyX opened this issue Nov 4, 2021 · 3 comments
Open

Automatically recognize available package managers #187

FrostyX opened this issue Nov 4, 2021 · 3 comments
Labels
distro Anything outside of Fedora effort/high Requires 3 or more days gain/medium Affects multiple users RFE

Comments

@FrostyX
Copy link
Owner

FrostyX commented Nov 4, 2021

Currently, we have a hardcoded dictionary in System.package_manager saying what package managers should be used on what distributions. I think this is no longer a good enough solution.

Maybe we could go through all package managers that Tracer can work with and see if they are available on the system. Each implementation of IPackageManager could provide is_available method running whatever check is necessary to decide whether such package manager is available on the system. If no package manager is found, we will raise an exception.

We should also do something like this for if System.distribution() in ["rhel", "fedora", "centos", "centos-7", "mageia", "suse", "ol"]: conditions.

@FrostyX FrostyX added the RFE label Nov 4, 2021
@ferdnyc
Copy link
Contributor

ferdnyc commented May 29, 2022

Maybe we could go through all package managers that Tracer can work with and see if they are available on the system.

That's not necessarily the best idea. I've had problems with other tools that do that, because apt is installed on my Fedora system. It's not the system package manager, but it's there and available. Too many tools see that, and jump right to the conclusion that it's a Debian-derived install when in reality nothing could be further from the truth. A certain package manager merely being available says... well, exactly nothing, honestly.

A better test might be to find some way to query what backend PackageKit is using on the host, which should be representative of the system package manager.

@FrostyX
Copy link
Owner Author

FrostyX commented May 29, 2022

Thank you for the insight @ferdnyc, I didn't think of that.

@ferdnyc
Copy link
Contributor

ferdnyc commented May 29, 2022

@FrostyX Yeah, I don't think I would have either, if I hadn't been bitten by it enough times. 🫤

@FrostyX FrostyX added the distro Anything outside of Fedora label Nov 26, 2023
@FrostyX FrostyX added effort/high Requires 3 or more days gain/medium Affects multiple users labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distro Anything outside of Fedora effort/high Requires 3 or more days gain/medium Affects multiple users RFE
Projects
None yet
Development

No branches or pull requests

2 participants