linux: enhance Deepin version detection using /etc/os-version#2300
Open
Iamliuxiaozhen wants to merge 5 commits intofastfetch-cli:devfrom
Open
linux: enhance Deepin version detection using /etc/os-version#2300Iamliuxiaozhen wants to merge 5 commits intofastfetch-cli:devfrom
Iamliuxiaozhen wants to merge 5 commits intofastfetch-cli:devfrom
Conversation
Add a Deepin-specific enhancement in Linux OS detection that reads `/etc/os-version` for `MinorVersion` and `EditionName`. When available, it now: - sets `versionID` to `MinorVersion` - updates `prettyName` to include version and optional edition This improves Deepin version accuracy and provides a clearer OS name than relying solely on generic `os-release` fields.feat(os): enhance Deepin detection with os-version data Add a Deepin-specific enhancement in Linux OS detection that reads `/etc/os-version` for `MinorVersion` and `EditionName`. When available, it now: - sets `versionID` to `MinorVersion` - updates `prettyName` to include version and optional edition This improves Deepin version accuracy and provides a clearer OS name than relying solely on generic `os-release` fields.
Update Deepin enhancement formatting to build `prettyName` from `result->name` instead of hardcoding "Deepin". This keeps output consistent with the detected distro name while still appending version and edition details.fix(os): use distro name when formatting Deepin prettyName Update Deepin enhancement formatting to build `prettyName` from `result->name` instead of hardcoding "Deepin". This keeps output consistent with the detected distro name while still appending version and edition details.
Only apply Deepin’s `minor` value to `versionID` when an edition is present and `prettyName` does not already include parenthesized details. This avoids incorrectly overriding parsed version info in enhanced names.fix(os/linux): guard Deepin minor version override Only apply Deepin’s `minor` value to `versionID` when an edition is present and `prettyName` does not already include parenthesized details. This avoids incorrectly overriding parsed version info in enhanced names. Co-authored-by: Copilot <copilot@github.com>
Contributor
Author
Contributor
Author
|
The failed jobs seem unrelated to this change. They failed while running add-apt-repository due to Launchpad connection timeouts. I'll re-run them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Enhance Deepin OS detection by parsing /etc/os-version.
This adds support for:
Instead of overriding the entire prettyName, this patch updates versionID
and appends edition information safely.
Example before:
OS: Deepin 25 x86_64
Example after:
OS: Deepin 25.1.0 (Community) x86_64