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

[BUG] KDE Neon is reported as Debian Bookworm/Sid #72

Closed
Jay2645 opened this issue Jan 1, 2024 · 9 comments
Closed

[BUG] KDE Neon is reported as Debian Bookworm/Sid #72

Jay2645 opened this issue Jan 1, 2024 · 9 comments
Assignees

Comments

@Jay2645
Copy link

Jay2645 commented Jan 1, 2024

Describe the bug
When a computer is running go-hass-agent with KDE Neon, the distribution is instead reported as Debian Bookworm/Sid. (Neon is based on Ubuntu LTS.)

To Reproduce
Steps to reproduce the behavior:

  1. Install go-hass-agent on a machine/VM running KDE Neon
  2. Open Home Assistant
  3. Look at the reported distribution

Expected behavior
The distribution should report KDE Neon.

Screenshots
image

Logs
go-hass-app.log

Desktop (please complete the following information):

  • OS: KDE neon 5.27 x86_64 (Kernel: 6.2.0-39-generic)
  • Browser: I suspect this template was made for a web dev, but I use Microsoft Edge (Chromium version)
  • Version: Version 120.0.2210.91 (Official build) (64-bit)
@joshuar
Copy link
Owner

joshuar commented Jan 2, 2024

This might be complicated to solve. I'm relying on the github.com/shirou/gopsutil/v3/host package to get the OS/distro information. From my grokking of the code it looks to preference getting the information from /etc/debian_version as opposed to other sources. I just spun up a KDE Neon live install and /etc/debian_version does report the Debian/bookworm info.

So I'm pretty sure this is the same problem as say, this person on PopOS is having with the above library: shirou/gopsutil#1469

I'd really like to avoid writing the code for this myself, because inevitably it might end up being a very big switch/else-if block that needs constant updating. Alternatively, I could just assume a canonical source like /etc/os-release and if a distro doesn't support that, it's gonna get "Unknown/Unknown" values. I will mention to the upstream library maintainer about whether adopting some hierarchy of places to get distro/version information would be good.

@joshuar
Copy link
Owner

joshuar commented Jan 2, 2024

I opened shirou/gopsutil#1576 upstream for discussion as well.

@joshuar
Copy link
Owner

joshuar commented May 23, 2024

Hey there, just circling back that since v9 the distribution should be reported correctly. Please let me know if it is not reporting the correct values for you!

@Jay2645
Copy link
Author

Jay2645 commented May 23, 2024

Hmm - just updated to see, and it's still reporting Sid for some reason:

image

@Jay2645
Copy link
Author

Jay2645 commented May 23, 2024

I'm still on KDE Neon:

image

@joshuar
Copy link
Owner

joshuar commented May 25, 2024

Ugh, so I wrote code to get the correct values, but I didn't actually change those sensors to use it 🤦

But that code wasn't enough, so I've refactored it and now it should be displaying the correct details in those sensors.

Can you try out the snapshot build from here:

https://github.com/joshuar/go-hass-agent/actions/runs/9218443179/artifacts/1533556590

This is an archive containing all the packages that would normally be on the release page (for amd64). It will effectively be the next release 🤞 Please extract and use the appropriate one.

Let me know if this works correctly!

@joshuar
Copy link
Owner

joshuar commented Jun 17, 2024

Hey there, I expect that the latest version (v9.4.0) should fix this issue. Can you please try with that version and report back?

@joshuar
Copy link
Owner

joshuar commented Jun 28, 2024

Hey there, I'm going to close this issue on the assumption it is now fixed. Please try with the latest release and re-open if this is still an issue.

@joshuar joshuar closed this as completed Jun 28, 2024
@Jay2645
Copy link
Author

Jay2645 commented Jul 3, 2024

Hey! Sorry, work's been a PITA recently. It's fixed in 9.5 for sure. Thank you!

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

No branches or pull requests

2 participants