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

Allow HOMEBREW_PREFIX replacement in external patches #15925

Open
1 task done
gaborbernat opened this issue Aug 31, 2023 · 1 comment
Open
1 task done

Allow HOMEBREW_PREFIX replacement in external patches #15925

gaborbernat opened this issue Aug 31, 2023 · 1 comment
Labels
features New features help wanted We want help addressing this

Comments

@gaborbernat
Copy link

Verification

Provide a detailed description of the proposed feature

This follows up the recommendation from #15841, to use:

patch do
  url "file://#{__dir__}/Formula.patch_name.diff"
end

for externally stored patches. My problem is that in this the following rule is not applied:

"In embedded patches, the string “HOMEBREW_PREFIX” is replaced with the value of the constant HOMEBREW_PREFIX before the patch is applied."

So I would like to enable this replacement (perhaps guarded by a boolean flag?).

What is the motivation for the feature?

This would allow us to move the embeded patches to external diff files.

How will the feature be relevant to at least 90% of Homebrew users?

Would make maintaining complex formulas with large diffs easier, and easier to configure formatter onto the formula files (as the formatter would not impact the diffs).

What alternatives to the feature have been considered?

Keeping the diff embeded means I cannot use formatter on the formula file.

@gaborbernat gaborbernat added the features New features label Aug 31, 2023
@MikeMcQuaid
Copy link
Member

Hi again @gaborbernat! Would review a PR for this. Might need to figure out how best to interpolate it or whatever.

@MikeMcQuaid MikeMcQuaid added the help wanted We want help addressing this label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features help wanted We want help addressing this
Projects
None yet
Development

No branches or pull requests

3 participants
@MikeMcQuaid @gaborbernat and others