tdf#140286 - CALC formula =INFO("OSVERSION") gives wrong output
chris.sherlock79 at gmail.com
Fri Jan 14 21:26:22 UTC 2022
>> I would prefer the string to be in the format:
>> Fedora 17 (Beefy Miracle) Kernel: 5.xxx (whatever it might be)
>> This is close to what is returned for the Mac and Windows versions.
> To me that's a very reasonable format of choice.
> Though, maybe we could add the word "Linux" somewhere just in case someone may use this to try to detect Linux platform independent of distros?
That’s very reasonable.
My only issue now, however, is how to expose this. Currently the SalInstance getOSVersion for macOS gives a string Mac OS X 11.6.2, my patch at https://gerrit.libreoffice.org/c/core/+/127921 changes it to something like:
Macintosh (Intel) Version 11.6.2 (Build 20G314)
Are people happy with this change?
I will work on a patch for Linux that parses /etc/os-release with a fallback to just the kernel version if that is not available (virtually all desktop systems use systemd now).
More information about the LibreOffice