Skip to content

Tools: environment_install: make sure Linux Mint dist is always mapped #29875

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

... to an Uubntu release.

Saves confusion on newer Mint releases as thje install will fail with a clear message rather than get confused on packages

Closes #29710

@tejashah88
Copy link
Contributor

@peterbarker I'll try testing this later this week, but 1 things I noticed from earlier. "jolnir" is not part of the Linux Mint ecosystem, but rather it seems to be added from #23260, which relates to a release from Elementary OS 6.1. You would need to add another conditional check for when lsb_release -i -s equals the equivalent distributor ID from Elementary OS for "jolnir" to work properly. I can see this becoming a maintenance "thorn in the side" if this list grows to other distributions outside Elementary OS.

@tejashah88
Copy link
Contributor

Another concern is that this change only stops unknown Linux Mint OS distributions, nothing outside that ecosystem. In other words, if someone installed ardupilot with Pop! OS or an unknown Elementary OS distribution and that user's release codename is not recognizable from the install script, it would be the same problem over again with "bullseye". I can see two ways to deal with this.

Option A: Set a hard filter against unknown OS distributions

This would be as simple as checking RELEASE_DISTRIBUTOR if it's from Ubuntu or LinuxMint exclusively. While this could be a "breaking change", this would guarantee compatibility against what has been well-tested. Users can raise issues for their specific OS as needed (which can be easy to add back support).

Option B: Implement checks for popular Ubuntu-variants and all their releases

This would involve having to check the RELEASE_CODENAME (lsb_release -c -s) and RELEASE_DISTRIBUTOR (lsb_release -i -s) for say the top 5 Ubuntu-based OS flavors and checking the release mapping to the Ubuntu counterpart, which seems over-engineered for a potentially non-existent userbase.

My Recommendation

I'd recommend Option A since it's simple to implement and adding support for specific releases can involve simply asking the user the output of lsb_release -c -s and lsb_release -i -s and checking against the ubuntu equivalent codenames.

... to an Uubntu release.

Saves confusion on newer Mint releases as thje install will fail with a clear message rather than get confused on packages
@peterbarker
Copy link
Contributor Author

Another concern is that this change only stops unknown Linux Mint OS distributions, nothing outside that ecosystem. In other words, if someone installed ardupilot with Pop! OS or an unknown Elementary OS distribution and that user's release codename is not recognizable from the install script, it would be the same problem over again with "bullseye". I can see two ways to deal with this.

Option A: Set a hard filter against unknown OS distributions

This would be as simple as checking RELEASE_DISTRIBUTOR if it's from Ubuntu or LinuxMint exclusively. While this could be a "breaking change", this would guarantee compatibility against what has been well-tested. Users can raise issues for their specific OS as needed (which can be easy to add back support).

Option B: Implement checks for popular Ubuntu-variants and all their releases

This would involve having to check the RELEASE_CODENAME (lsb_release -c -s) and RELEASE_DISTRIBUTOR (lsb_release -i -s) for say the top 5 Ubuntu-based OS flavors and checking the release mapping to the Ubuntu counterpart, which seems over-engineered for a potentially non-existent userbase.

My Recommendation

I'd recommend Option A since it's simple to implement and adding support for specific releases can involve simply asking the user the output of lsb_release -c -s and lsb_release -i -s and checking against the ubuntu equivalent codenames.

I don't have a huge amount of interest in adding support for the less-popular Linux distributions - the lines you're thinking of with "over-engineering".

Someone with a bit more time and inclination could come in and do enough work that we could become strict on the distribution accepted, but I thought a little bit of work for Mint (given its popularity) was worthwhile, thus this PR.

@peterbarker
Copy link
Contributor Author

@peterbarker I'll try testing this later this week, but 1 things I noticed from earlier. "jolnir" is not part of the Linux Mint ecosystem, but rather it seems to be added from #23260, which relates to a release from Elementary OS 6.1. You would need to add another

Done

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

Successfully merging this pull request may close these issues.

Feature request: Better handling of default behaviour when installing dependencies for Ubuntu/Debian-variants
3 participants