tdf#140286 - CALC formula =INFO("OSVERSION") gives wrong output

Eike Rathke erack at redhat.com
Mon Jan 17 21:11:41 UTC 2022


Hi,

On Saturday, 2022-01-15 08:26:22 +1100, Chris Sherlock wrote:

> > 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?

If that resembles what Excel returns then yes.


> 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).

Please bear in mind that GNU/Linux isn't the only *iX platform
supported. In ./configure in 'case "$host_os" in' there is the '_os'
variable set to the build platform at least, so that's an indicator of
possible variants.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220117/e17f0fd0/attachment.sig>


More information about the LibreOffice mailing list