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 support for KDE Neon (and other Linux distros with ID_LIKE) #890

Merged
merged 1 commit into from
Nov 11, 2016

Conversation

gregg-miskelly
Copy link
Contributor

This checkin adds support for checking the ID_LIKE field in the os-release file to try and find a compatible base OS. This support is imperfect since ID_LIKE doesn't provide a version number for the downstream OS(s). But this at least works for KDE Neon.

Associated issue: #879

VERSION="1.0 (rogers)"
ID=MakeBelieve`;

return LinuxDistribution.FromReleaseInfo(input, '\n');
Copy link
Member

Choose a reason for hiding this comment

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

yay! tests! 😄

@@ -69,14 +71,17 @@ export class LinuxDistribution {
else if (key === 'VERSION_ID') {
version = value;
}
else if (key === 'ID_LIKE') {
idLike = value.split(" ");
}

if (name !== unknown && version !== unknown) {
Copy link
Member

Choose a reason for hiding this comment

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

Is the intended design that we will ignore ID_LIKE if ID and VERSION_ID are set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We ignore ID_LIKE if ID is something we understand. If we don't understand ID, we will iterate through the ID_LIKE values to see if we understand any of them.

Copy link
Member

Choose a reason for hiding this comment

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

Is that what it does though? It looks like it will bail if ID_LIKE hasn't been encountered and we find ID and VERSION_ID values -- even if we don't understand them.

This checkin adds support for checking the ID_LIKE field in the os-release file to try and find a compatible base OS. This support is imperfect since ID_LIKE doesn't provide a version number for the downstream OS(s). But this at least works for KDE Neon.
@DustinCampbell
Copy link
Member

Did you force push?


if (name !== unknown && version !== unknown) {
if (name !== unknown && version !== unknown && idLike !== null) {
Copy link
Member

Choose a reason for hiding this comment

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

Now this looks right. 😄

@DustinCampbell DustinCampbell merged commit 8f281ba into dotnet:master Nov 11, 2016
@gregg-miskelly gregg-miskelly deleted the KDENeon branch March 3, 2017 17:35
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.

3 participants