Skip to content

Fix more HOMEBREW_FORBID_PACKAGES_FROM_PATHS issues#20468

Merged
MikeMcQuaid merged 1 commit intomainfrom
more_forbid_packages_fixes
Aug 14, 2025
Merged

Fix more HOMEBREW_FORBID_PACKAGES_FROM_PATHS issues#20468
MikeMcQuaid merged 1 commit intomainfrom
more_forbid_packages_fixes

Conversation

@MikeMcQuaid
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid commented Aug 14, 2025

  • Ensure that we're overriding it where necessary internally (but not allowing this to be used as a public opt-out API)
  • Better handle formulae from paths that look like taps

Closes https://github.com/orgs/Homebrew/discussions/6344
Closes #20448
Closes #20465

CC @imunproductive @shivammathur @ipatch @eu-ge-ne as affected parties to retry once this is merged.

@MikeMcQuaid MikeMcQuaid force-pushed the more_forbid_packages_fixes branch from 23fb547 to b2df781 Compare August 14, 2025 18:34
- Ensure that we're overriding it where necessary internally (but not
  allowing this to be used as a public opt-out API)
- Better handle formulae from paths that look like taps
@MikeMcQuaid MikeMcQuaid force-pushed the more_forbid_packages_fixes branch from b2df781 to c143b03 Compare August 14, 2025 18:35
@MikeMcQuaid MikeMcQuaid enabled auto-merge August 14, 2025 18:35
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Aug 14, 2025
Merged via the queue into main with commit 511cb44 Aug 14, 2025
36 checks passed
@MikeMcQuaid MikeMcQuaid deleted the more_forbid_packages_fixes branch August 14, 2025 19:09
@ipatch
Copy link
Copy Markdown

ipatch commented Aug 14, 2025

this seems to have resolved this issue for me.

https://github.com/ipatch/homebrew-us-05/actions/runs/16974483885/job/48119731728?pr=39

thanks 🙏

@ipatch
Copy link
Copy Markdown

ipatch commented Aug 14, 2025

fwiw i now getting this error with the publish.yml workflow on github

https://github.com/ipatch/homebrew-us-05/actions/runs/16975133872/job/48122001636?pr=39

Bundle complete! 43 Gemfile dependencies, 17 gems now installed.
Bundled gems are installed into `../../../home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/bundle`
Error: Rejecting formula at /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/ipatch/homebrew-us-05/Formula/libnoise.rb because it's not in a tap.
      Homebrew requires formulae to be in a tap.

To create a tap, run e.g.
  brew tap-new <user|org>/<repository>
To create a formula in a tap run e.g.
  brew create <url> --tap=<user|org>/<repository>

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:624:in 'Formulary::FromPathLoader.try_new'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1180:in 'block in Formulary.loader_for'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1179:in 'Array#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1179:in 'Formulary.loader_for'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:973:in 'Formulary.factory'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:127:in 'block in Homebrew::DevCmd::PrUpload#check_bottled_formulae!'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:125:in 'Hash#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:125:in 'Homebrew::DevCmd::PrUpload#check_bottled_formulae!'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:83:in 'Homebrew::DevCmd::PrUpload#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:110:in '<main>'
Rerun with `--verbose` to see the original backtrace
Error: Failure while executing; `/home/linuxbrew/.linuxbrew/bin/brew pr-upload --debug` exited with 1.
Rerun with `--verbose` to see the original backtrace
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:323:in 'Kernel#safe_system'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:170:in 'block (2 levels) in Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'Dir.chdir'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'FileUtils#cd'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:114:in 'block in Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:92:in 'Array#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:92:in 'Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:110:in '<main>'
Error: Process completed with exit code 1.

@eu-ge-ne
Copy link
Copy Markdown

Hi, confirm that the issue with test-bot is resolved. But pr-pull is still failing (apparently the same issue as in test-bot):

https://github.com/eu-ge-ne/homebrew-tap/actions/runs/16975600430/job/48123654443?pr=3

Error: Rejecting formula at /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/eu-ge-ne/homebrew-tap/Formula/toy.rb because it's not in a tap.
      Homebrew requires formulae to be in a tap.

To create a tap, run e.g.
  brew tap-new <user|org>/<repository>
To create a formula in a tap run e.g.
  brew create <url> --tap=<user|org>/<repository>

/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:624:in 'Formulary::FromPathLoader.try_new'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1180:in 'block in Formulary.loader_for'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1179:in 'Array#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:1179:in 'Formulary.loader_for'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formulary.rb:973:in 'Formulary.factory'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:127:in 'block in Homebrew::DevCmd::PrUpload#check_bottled_formulae!'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:125:in 'Hash#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:125:in 'Homebrew::DevCmd::PrUpload#check_bottled_formulae!'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-upload.rb:83:in 'Homebrew::DevCmd::PrUpload#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:110:in '<main>'
Rerun with `--verbose` to see the original backtrace
Error: Failure while executing; `/home/linuxbrew/.linuxbrew/bin/brew pr-upload --debug` exited with 1.
Rerun with `--verbose` to see the original backtrace
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/extend/kernel.rb:323:in 'Kernel#safe_system'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:170:in 'block (2 levels) in Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'Dir.chdir'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/3.4.5/lib/ruby/3.4.0/fileutils.rb:241:in 'FileUtils#cd'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:114:in 'block in Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:92:in 'Array#each'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/dev-cmd/pr-pull.rb:92:in 'Homebrew::DevCmd::PrPull#run'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:110:in '<main>'
Error: Process completed with exit code 1.

@ipatch
Copy link
Copy Markdown

ipatch commented Aug 14, 2025

@eu-ge-ne give it another try, it seems to be working now 🤞

https://github.com/ipatch/homebrew-us-05/actions/runs/16976419809/job/48126416398

@eu-ge-ne
Copy link
Copy Markdown

@MikeMcQuaid
Copy link
Copy Markdown
Member Author

@ipatch @eu-ge-ne #20470 I think is should be doing things. I was confused due to being unable to reproduce this locally before I remembered our tap setup uses symlinks in a strange way.

@imunproductive
Copy link
Copy Markdown

imunproductive commented Aug 16, 2025

@MikeMcQuaid Sorry for late response. This PR fixed the issue for me. Can't speak of pr-pull as I have a custom workflow instead (which succeeded too). Thank you for taking your time fixing this!

@eu-ge-ne
Copy link
Copy Markdown

Hi, my pr-pull, which is completely stock, ran successfully after the fix. @MikeMcQuaid thank you!

@MikeMcQuaid
Copy link
Copy Markdown
Member Author

Glad it's sorted thanks for reporting back @imunproductive @eu-ge-ne!

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.

Brew test bot failure on finding formula in third party tap [Regression] Installation fails for local formula with the setup-homebrew action

5 participants