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 host OS version to --version output #400

Closed
esden opened this issue Oct 2, 2023 · 6 comments · Fixed by #440
Closed

Add host OS version to --version output #400

esden opened this issue Oct 2, 2023 · 6 comments · Fixed by #440
Assignees
Labels
feature-request Meta: feature request

Comments

@esden
Copy link
Member

esden commented Oct 2, 2023

We ask users to provide exact OS version when reporting bugs. It would be useful to have that info included in the glasgow --version output to make sure the information is provided correctly and with the necessary granularity.

Alternatively we could have a separate CLI option to provide all the necessary system information to make debugging of user reported bugs easier. As it might be good to know some extra information about how the hardware is connected to the system too.

@esden esden added the feature-request Meta: feature request label Oct 2, 2023
@whitequark
Copy link
Member

I have no idea how to actually implement this. Hopefully there is a library or something!

@emaste
Copy link

emaste commented Oct 2, 2023

platform.platform() is probably good -- on my system

>>> import platform
>>> platform.platform()
'FreeBSD-14.0-CURRENT-amd64-64bit-ELF'

@whitequark
Copy link
Member

Not sure it's so good on Debian...

@emaste
Copy link

emaste commented Oct 2, 2023

Perhaps information from /etc/os-release? We adopted that from the Linux ecosystem, although I'm not sure if it's universal.

On my laptop it contains:

NAME=FreeBSD
VERSION=14.0-CURRENT
VERSION_ID=14.0
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 14.0-CURRENT"
CPE_NAME=cpe:/o:freebsd:freebsd:14.0
HOME_URL=https://FreeBSD.org/
BUG_REPORT_URL=https://bugs.FreeBSD.org/

@whitequark
Copy link
Member

whitequark commented Oct 2, 2023

Perhaps information from /etc/os-release? We adopted that from the Linux ecosystem, although I'm not sure if it's universal.

Yep, I think that's the way to go! /etc/os-release on *nix (falling back to platform.uname() if not available) and its own thing on Windows.

@whitequark
Copy link
Member

Also maybe we should add the versions of every installed package (or at least every glasgow dependency there) too; cf. #408, though there --version itself fails.

@attie attie added the nominated Meta: nominated for next meeting label Oct 7, 2023
@attie attie removed the nominated Meta: nominated for next meeting label Oct 7, 2023
whitequark added a commit to whitequark/glasgow that referenced this issue Oct 9, 2023
whitequark added a commit to whitequark/glasgow that referenced this issue Oct 9, 2023
whitequark added a commit to whitequark/glasgow that referenced this issue Oct 9, 2023
github-merge-queue bot pushed a commit that referenced this issue Oct 10, 2023
Fixes #400.

Co-authored-by: Charlotte <charlotte@lottia.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Meta: feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants