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

Add linux mint support #817

Merged
merged 1 commit into from
May 26, 2024
Merged

Add linux mint support #817

merged 1 commit into from
May 26, 2024

Conversation

lachsdachs
Copy link
Contributor

Detect linuxmint distros and treat them as debian.

Question: how does ubuntu work here?
Mint is a Ubuntu fork and i have seen linuxmint strata getting the Ubuntu treatment in the upgrade_bedrock section, but i have not found any code that handles Ubuntu distros. But topgrade surely has support for the most popular distro of all, doesn't it? is it okay to treat ubuntu distros as debian?

@SteveLauC
Copy link
Member

Question: how does ubuntu work here?

It will be treated as Debian given it ID_LIKE field is debian: https://github.com/which-distro/os-release/blob/main/ubuntu/22.04

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I am actually surprised that this wasn't already supported by Topgrade:<

@SteveLauC SteveLauC merged commit 3cc8f0d into topgrade-rs:main May 26, 2024
11 checks passed
@lachsdachs
Copy link
Contributor Author

lachsdachs commented Jun 6, 2024

It will be treated as Debian given it ID_LIKE field is debian: https://github.com/which-distro/os-release/blob/main/ubuntu/22.04

Does that mean that the distro detection logic is currently implemented in different places? Because that seems like a bad idea.

For example, the os-release thingy already has a linuxmint file with an 'ID-LIKE' set to "ubuntu", so it seems more sensible to just recursively check those files instead of implementing some of the decisions in topgrade and delegating others to os-release.

@SteveLauC
Copy link
Member

Does that mean that the distro detection logic is currently implemented in different places? Because that seems like a bad idea.

No, at least for now, I do want to build a Linux distro detection crate but hasn't started, so Topgrade still do the detection itself.

@SteveLauC
Copy link
Member

Even though Linux mint has its ID_LIKE set to ubuntu, it actually doesn't matter since it's unique ID is sufficient for detection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants