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

API installs do not respect link_overwrite #14721

Closed
3 tasks done
eifr-vault opened this issue Feb 20, 2023 · 6 comments · Fixed by #14725
Closed
3 tasks done

API installs do not respect link_overwrite #14721

eifr-vault opened this issue Feb 20, 2023 · 6 comments · Fixed by #14725
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs outdated PR was locked due to age

Comments

@eifr-vault
Copy link

eifr-vault commented Feb 20, 2023

brew gist-logs <formula> link OR brew config AND brew doctor output

HOMEBREW_VERSION: 4.0.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: 17c872fb5275d87922a56416587cb439a5064354
Last commit: 4 days ago
Core tap origin: https://github.com/Homebrew/homebrew-core
Core tap HEAD: bb3c5b576fb0b13d844fc5395a46e9411ba86e37
Core tap last commit: 45 minutes ago
Core tap branch: master
Core tap JSON: 20 Feb 11:57 UTC
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit ivybridge
Clang: 13.1.6 build 1316
Git: 2.36.1 => /usr/local/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.3.1-x86_64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1 => /Applications/Xcode-13.4.1.app/Contents/Developer
Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  python@3.11
static:~ distiller$ Warning: You have unlinked kegs in your Cellar.

Verification

  • My "brew doctor output" says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

run brew upgrade on my circleci machine

What happened (include all command output)?

==> Pouring python@3.11--3.11.2_1.monterey.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/man1/python3.1
Target /usr/local/share/man/man1/python3.1
is a symlink belonging to python@3.9. You can unlink it:
  brew unlink python@3.9

To force the link and overwrite all conflicting files:
  brew link --overwrite python@3.11

To list all files that would be deleted:
  brew link --overwrite --dry-run python@3.11

Possible conflicting files are:
/usr/local/share/man/man1/python3.1 -> /usr/local/Cellar/python@3.9/3.9.12/share/man/man1/python3.1
/usr/local/lib/pkgconfig/python3-embed.pc -> /usr/local/Cellar/python@3.9/3.9.12/lib/pkgconfig/python3-embed.pc
/usr/local/lib/pkgconfig/python3.pc -> /usr/local/Cellar/python@3.9/3.9.12/lib/pkgconfig/python3.pc
/usr/local/Frameworks/Python.framework/Headers -> /usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Headers
/usr/local/Frameworks/Python.framework/Python -> /usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Resources
/usr/local/Frameworks/Python.framework/Versions/Current -> /usr/local/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/Current
==> /usr/local/Cellar/python@3.11/3.11.2_1/bin/python3.11 -m ensurepip
==> /usr/local/Cellar/python@3.11/3.11.2_1/bin/python3.11 -m pip install -v --no

What did you expect to happen?

Brew upgrade to be done correctly

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

1. brew upgrade
@eifr-vault eifr-vault added the bug Reproducible Homebrew/brew bug label Feb 20, 2023
@carlocab
Copy link
Member

This shouldn't be happening because of

https://github.com/Homebrew/homebrew-core/blob/bb3c5b576fb0b13d844fc5395a46e9411ba86e37/Formula/python%403.11.rb#L60

My guess is that link_overwrite doesn't work for API installs.

CC @Homebrew/brew

@carlocab
Copy link
Member

carlocab commented Feb 20, 2023

We'll get this bug fixed, but as a temporary workaround, you can do

export HOMEBREW_NO_INSTALL_FROM_API=1

in your CI. Make sure this is set before any brew operations.

@carlocab carlocab transferred this issue from Homebrew/homebrew-core Feb 20, 2023
@carlocab carlocab added the install from api Relates to API installs label Feb 20, 2023
@eifr-vault
Copy link
Author

thx @carlocab for the quick response!
Actually fixed it by just upgrading my executor (circleci) to a newer xcode version (from 13.3.0 to 14.2.0)

@Bo98
Copy link
Member

Bo98 commented Feb 20, 2023

Oh oops, we must have missed link_overwrite. Will treat this as high priority given it affects Python.

@carlocab
Copy link
Member

Oh oops, we must have missed link_overwrite. Will treat this as high priority given it affects Python.

While we're at it I guess we want skip_clean too?

@Bo98
Copy link
Member

Bo98 commented Feb 20, 2023

I think skip_clean only applies to build-from-source if I'm not mistaken.

@carlocab carlocab changed the title getting Error: The brew link step did not complete successfully on CI when running brew upgrade API installs do not respect link_overwrite Feb 20, 2023
@github-actions github-actions bot added the outdated PR was locked due to age label Mar 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug install from api Relates to API installs outdated PR was locked due to age
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants