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 audit should not set HOMEBREW_NO_INSTALL_FROM_API for non-core formulae #14701

Closed
3 tasks done
Bo98 opened this issue Feb 18, 2023 · 4 comments
Closed
3 tasks done
Assignees
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this install from api Relates to API installs outdated PR was locked due to age

Comments

@Bo98
Copy link
Member

Bo98 commented Feb 18, 2023

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.0.1-59-gae4fb07
ORIGIN: https://github.com/Homebrew/brew
HEAD: ae4fb0749467f2eb00014279c441d803326da929
Last commit: 13 hours ago
Core tap JSON: 18 Feb 03:30 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_GITHUB_PACKAGES_TOKEN: set
HOMEBREW_GITHUB_PACKAGES_USER: Bo98
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 14.0.0 build 1400
Git: 2.37.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.6.3-x86_64
CLT: 14.1.0.0.1.1666437224
Xcode: 14.1

What were you trying to do (and why)?

Run brew audit on a third-party tap when Homebrew/core is not tapped.

What happened (include all command output)?

brew audit fails because it forces non-API mode:

  bo98/test/test1:
    * Can't find dependency '"cmake"'.

What did you expect to happen?

brew audit should pass. We are not modifying Homebrew/core so the API has enough information for it to work with third-party taps without needing an expensive clone operation. The latest Ubuntu 22.04 GitHub Actions image no longer ships Homebrew/core.

Removing audit from the forced-HOMEBREW_NO_INSTALL_FROM_API list fixes the problem and the full test run works successfully.

Step-by-step reproduction instructions (by running brew commands)

brew audit on a third-party formula that depends on a Homebrew/core formula while Homebrew/core is untapped.

@Bo98 Bo98 added the bug Reproducible Homebrew/brew bug label Feb 18, 2023
@Bo98
Copy link
Member Author

Bo98 commented Feb 19, 2023

https://github.com/orgs/Homebrew/discussions/4237 expresses similar concern for brew test, except the issue there wasn't even down to untapped core - a simply stale tap was enough to cause issues. brew audit can also be affected by stale taps over time.

@Bo98
Copy link
Member Author

Bo98 commented Feb 20, 2023

Not sure if there's really a general solution for this. I can fix the specific audit issue seen via Bo98@ec08323

@MikeMcQuaid
Copy link
Member

Good write-up, thanks @Bo98.

I think eventually we'll probably want to remove all these HOMEBREW_NO_INSTALL_FROM_API auto-sets in favour of figuring out what makes more sense on a command-by-command basis.

@MikeMcQuaid MikeMcQuaid added the install from api Relates to API installs label Feb 20, 2023
@Bo98 Bo98 changed the title brew audit should not set HOMBREW_NO_INSTALL_FROM_API for non-core formulae brew audit should not set HOMEBREW_NO_INSTALL_FROM_API for non-core formulae Feb 20, 2023
@MikeMcQuaid
Copy link
Member

Fixed in #14793

@MikeMcQuaid MikeMcQuaid added the in progress Maintainers are working on this label Feb 24, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug in progress Maintainers are working on this install from api Relates to API installs outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

2 participants