Skip to content

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Nov 13, 2025

  • 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 lgtm (style, typechecking and tests) with your changes locally?

libexec can contain resources and installing metafiles can override the correct metafiles (e.g. readme and license).

Also, this provides a way to prevent brew from moving files that we want to retain within libexec.


This provides an alternative approach to following issue, rather than modifying skip_clean logic:

Closes #20922 (MikeMcQuaid edit)

libexec can contain resources and installing metafiles can override the
correct metafiles (e.g. readme and license).

Also, this provides a way to prevent brew from moving files that we want
to retain within libexec.
Copilot AI review requested due to automatic review settings November 13, 2025 01:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modifies the build process to prevent overwriting metafiles (README, LICENSE, etc.) in the formula prefix when installing from libexec. If the prefix already contains metafiles (installed from buildpath), the PR skips installing additional metafiles from libexec to avoid overriding the correct ones.

Key Changes:

  • Added conditional check before installing metafiles from libexec to prevent overriding existing metafiles in the prefix
  • The logic checks if any metafiles already exist in formula.prefix before attempting to install from formula.libexec

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Good idea, thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 35e0c3d Nov 13, 2025
43 checks passed
@MikeMcQuaid MikeMcQuaid deleted the libexec-metafiles branch November 13, 2025 09:53
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.

Homebrew cleans metafiles after formula installation even if skip_clean is used

3 participants