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

brew: disable compat mode when running sw_vers #10722

Closed
wants to merge 1 commit into from

Conversation

gromgit
Copy link
Member

@gromgit gromgit commented Feb 27, 2021

As far as I can tell, Homebrew believes Big Sur == 11.x, so we should make sure sw_vers doesn't output 10.16.

Addresses Homebrew/discussions#941


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

@BrewTestBot
Copy link
Member

Review period will end on 2021-03-02 at 00:00:00 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 27, 2021
@gromgit gromgit closed this Feb 27, 2021
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 27, 2021
@gromgit gromgit reopened this Feb 27, 2021
@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Feb 27, 2021
@Bo98
Copy link
Member

Bo98 commented Feb 27, 2021

Thinking about this again, I forgot that env filtering is applied here. How did this env manage to slip through that?

Addresses Homebrew/discussions#941

Also correctly strip everything but major version for Big Sur and later.
@gromgit gromgit force-pushed the nuke-version-compat branch from eef537d to 6cfb0dd Compare February 28, 2021 12:32
@gromgit
Copy link
Member Author

gromgit commented Feb 28, 2021

I forgot that env filtering is applied here. How did this env manage to slip through that?

That's...a very good question. 😕

In any event, I've added another fix, to strip everything but major version from HOMEBREW_MACOS_VERSION for Big Sur and later. Big Sur versions now have patchlevel numbers, so the current code incorrectly strips 11.2.1 down to 11.2.

@Bo98
Copy link
Member

Bo98 commented Feb 28, 2021

to strip everything but major version from HOMEBREW_MACOS_VERSION for Big Sur

I'm not entirely sure about this code - we don't strip any patch versions for earlier macOS versions.

Seems a bit weird and inconsistent to make this be the major version only while the earlier versions still have the full 10.15.7.

@gromgit
Copy link
Member Author

gromgit commented Feb 28, 2021

AFAICT, HOMEBREW_OS_VERSION (which becomes OS_VERSION in Ruby-land) is just a label that's added to various diagnostics outputs, so I guess it's not a critical issue. I'm just making sure the code agrees with the associated comment. 😁

@MikeMcQuaid
Copy link
Member

Thinking about this again, I forgot that env filtering is applied here. How did this env manage to slip through that?

Yeh, this.

I think I'd like to hold off here until we see at least one other person with this problem.

@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Mar 2, 2021
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to wait to see at least one other person with this problem.

@BrewTestBot
Copy link
Member

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@BrewTestBot BrewTestBot added the stale No recent activity label Mar 24, 2021
@BrewTestBot BrewTestBot closed this Apr 1, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label May 2, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 2, 2021
@gromgit gromgit deleted the nuke-version-compat branch June 25, 2021 11:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants