-
Notifications
You must be signed in to change notification settings - Fork 669
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
Conversation
VERSION="1.0 (rogers)" | ||
ID=MakeBelieve`; | ||
|
||
return LinuxDistribution.FromReleaseInfo(input, '\n'); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
a54683f
to
a2b4ed8
Compare
Did you force push? |
|
||
if (name !== unknown && version !== unknown) { | ||
if (name !== unknown && version !== unknown && idLike !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now this looks right. 😄
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