Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Differentiation between macOS versions #59

Open
jzelinskie opened this issue Apr 20, 2018 · 3 comments
Open

Differentiation between macOS versions #59

jzelinskie opened this issue Apr 20, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@jzelinskie
Copy link

It looks like platform-wise every version of macOS is treated as a single target: darwin amd64.

I know this maps to the model used by the Go programming language, but homebrew clearly distinguishes packages for the different releases of macOS. This will probably start to matter when you define packages that link against system libraries.

Is there a design goal to address this problem?

@bacongobbler
Copy link
Contributor

bacongobbler commented Apr 20, 2018

I haven't figured out how to determine which major OS release you're on, but we can certainly look into Homebrew core to figure out how they do it for MacOS. Once that's determined, we can then see how we can translate that to Windows and Linux. So yes, it'd be nice to solve this problem. For now the assumption is only the latest major OS releases are supported: Windows 10, High Sierra and... w/e flavour of Ubuntu/Debian is the latest.

@bacongobbler
Copy link
Contributor

bacongobbler commented Apr 20, 2018

If I'm reading the code right, the assumption is that the latest version of Homebrew supports bottles compiled on High Sierra by default, but there is no system in place to determine the underlying major OS release Homebrew is running on. That is configured separately through $HOMEBREW_MACOS_VERSION (or $HOMEBREW_OSX_VERSION for backwards compatibility), likely configured through the install script. That doesn't seem too hard to implement if someone wants to take a crack at it :)

@bacongobbler
Copy link
Contributor

bacongobbler commented Apr 20, 2018

Neat! There is a CLI tool available to determine the equivalent of /etc/os-release on Mac. and they do seem to be utilizing it in the install scripts. This does seem do-able. https://github.com/Homebrew/brew/blob/bbbd6d86b8885e4f5fc8ea10fd531fe91a2f5ec7/Library/Homebrew/brew.sh#L85-L86

><> cat /etc/os-release
cat: /etc/os-release: No such file or directory
><> sw_vers -productRelease
10.13.4

@bacongobbler bacongobbler added the enhancement New feature or request label Jul 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants