Skip to content

linux: enhance Deepin version detection using /etc/os-version#2300

Open
Iamliuxiaozhen wants to merge 5 commits intofastfetch-cli:devfrom
Iamliuxiaozhen:deepin
Open

linux: enhance Deepin version detection using /etc/os-version#2300
Iamliuxiaozhen wants to merge 5 commits intofastfetch-cli:devfrom
Iamliuxiaozhen:deepin

Conversation

@Iamliuxiaozhen
Copy link
Copy Markdown
Contributor

Enhance Deepin OS detection by parsing /etc/os-version.

This adds support for:

  • MinorVersion (e.g. 25.1.0)
  • EditionName (e.g. Community)

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

Iamliuxiaozhen and others added 3 commits May 3, 2026 21:38
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>
@Iamliuxiaozhen
Copy link
Copy Markdown
Contributor Author

image

@Iamliuxiaozhen
Copy link
Copy Markdown
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.

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.

2 participants