KEMBAR78
feat: reinstall pkgconf automatically on macOS version mismatch by naboyu · Pull Request #20674 · Homebrew/brew · GitHub
Skip to content

Conversation

naboyu
Copy link
Contributor

@naboyu naboyu commented Sep 12, 2025

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

This PR follows up on #20418 by implementing the automatic mitigation requested in the source code comment. It changes the pkgconf macOS SDK mismatch diagnostic from a passive warning to adds an active repair attempt.

The diagnostic check update-report and upgrade now perform the following steps:

  1. Detects if pkgconf was built on a different version of macOS.
  2. If a mismatch is found, it informs the user and automatically attempts to run brew reinstall pkgconf.
  3. If the automatic reinstall fails, it reports the error and provides the manual command as a fallback.

This provides a better user experience by solving the issue directly for the underlying problem noted in issue #16137.

@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch 3 times, most recently from aecff61 to d3bfd65 Compare September 12, 2025 05:02
@naboyu naboyu marked this pull request as ready for review September 12, 2025 05:22
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.

Thanks! Should be good to go when code is merged elsewhere.

@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch from d3bfd65 to 2389d78 Compare September 13, 2025 02:19
@naboyu naboyu changed the title doctor: Automatically reinstall pkgconf on macOS version mismatch feat: reinstall pkgconf automatically on macOS version mismatch Sep 13, 2025
@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch 2 times, most recently from 077f572 to 78195a1 Compare September 13, 2025 02:45
@naboyu naboyu marked this pull request as draft September 13, 2025 02:46
@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch 7 times, most recently from 9c5ca3b to a5b612f Compare September 13, 2025 07:48
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.

Great job, this approach is looking much better so far! A few comments, feel free to disagree with any.

@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch 2 times, most recently from aa1bed5 to 3176dd2 Compare September 13, 2025 22:22
@naboyu naboyu force-pushed the fix-pkgconf-reinstall branch from 3176dd2 to 587433a Compare September 13, 2025 22:43
@naboyu naboyu marked this pull request as ready for review September 13, 2025 23:02
@naboyu
Copy link
Contributor Author

naboyu commented Sep 13, 2025

Great job, this approach is looking much better so far! A few comments, feel free to disagree with any.

Thanks, @MikeMcQuaid! Your help was key to getting this working. This is my first time in this codebase and with Ruby, so if there are any other conventions or things to look out for, please let me know.

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.

Looks great, thanks! Wonderful work here @naboyu, I'm really impressed 👏🏻. Hopefully many more PRs incoming from you 😍

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Sep 15, 2025
Merged via the queue into Homebrew:main with commit 899d533 Sep 15, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants