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

Provide way to deal with distro inconsistencies #109

Open
andy-maier opened this issue Apr 19, 2016 · 5 comments
Open

Provide way to deal with distro inconsistencies #109

andy-maier opened this issue Apr 19, 2016 · 5 comments

Comments

@andy-maier
Copy link
Collaborator

andy-maier commented Apr 19, 2016

There are Linux distros that have inconsistent information in the data sources that ld uses.

For example , see issue #78 about Linux Mint. In that case, the precedence implemented by ld causes Linux Mint to be shown as an Ubuntu. While it is fairly compatible to Ubuntu, it is not Ubuntu. It has its own name, id, version (Linux Mint 17.3 is based upon Ubuntu 14.04), and code name ("rose" for Linux Mint 17).

I think that instead of asking the distros to become consistent, that calls for some mechanism in ld to deal with that.

We already parse all three data sources if available, and we could find out that the (normalized) IDs are different, and if so, trigger some special-case processing. In the case of Linux Mint, the special processing would be to ignore those data sources that advertise Ubuntu.

I guess the trick is to implement this without getting into endless if-elif-else statements.

@nir0s
Copy link
Collaborator

nir0s commented Apr 19, 2016

I guess we could easily implement a class per special case. Thing is, if we don't do if else here to explicitly provide the distros we know are "problematic", we'll be forcing checking for that consistency throughout all distros even if 99% of them don't have that problem. I'm not saying we shouldn't, just raising it as an issue.

My intuition tells me that a "bug which happens once is not a bug". We can specifically specify Linux Mint's condition in the code and return different values for it. If we stumble across additional distros containing this issue, we can start discussing a mechanism.

The implementation doesn't have to be ugly. We could state a list of distros which override the type of information returned and put mint in that list.

@sethmlarson
Copy link
Contributor

To make things easier for us and more consistent across multiple tools imo we should treat bugs in /etc/*-release files as bugs upstream instead of something actionable in Distro. Thoughts from other maintainers?

@brejoc
Copy link
Member

brejoc commented Dec 21, 2021

To make things easier for us and more consistent across multiple tools imo we should treat bugs in /etc/*-release files as bugs upstream instead of something actionable in Distro. Thoughts from other maintainers?

While I would absolutely sympathize with this approach, this might mean that things stay broken for a long time. It's sometimes hard to motivate distros to change something in their *-release files, and even if they are willing to, the release cycles might be pretty long.

@nir0s
Copy link
Collaborator

nir0s commented Dec 23, 2021

I'm with @brejoc here. The reason why you need distro in the first place is to abstract long-term ugliness.

@sethmlarson
Copy link
Contributor

I'm not sure that this fix is needed though, wouldn't we see more chatter / +1s on this issue if there were widespread problems with distributions identifying incorrectly? Quoting @nir0s from 2016:

My intuition tells me that a "bug which happens once is not a bug".

I feel we should place our already limited time+focus on new and non-deprecated platforms instead.

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

No branches or pull requests

4 participants