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

banning shallow clones breaks existing installs with no explanation #9426

Closed
3 tasks done
gotyaoi opened this issue Dec 5, 2020 · 3 comments
Closed
3 tasks done

banning shallow clones breaks existing installs with no explanation #9426

gotyaoi opened this issue Dec 5, 2020 · 3 comments
Labels
outdated PR was locked due to age

Comments

@gotyaoi
Copy link

gotyaoi commented Dec 5, 2020

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

run brew update

What happened (include command output)

errors out

Command output

Error: homebrew-core is a shallow clone. To brew update first run:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow

What you expected to happen

the update should run, or the error should have more explanation

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

brew update after updating to 10e7316

Output of brew config and brew doctor commands

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
  /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
  /Library/Frameworks/Python.framework/Versions/2.7/bin/python-config

HOMEBREW_VERSION: 2.6.0-91-g7e3e86e
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7e3e86eb41d1b8f29708ac451946ff4f561d1abc
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: cc60bcab602e7fdceb87e5d4118f7b7364cdf64d
Core tap last commit: 4 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 4
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: quad-core 64-bit ivybridge
Clang: 12.0 build 1200
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 11.0.9.1
macOS: 10.15.7-x86_64
CLT: 12.2.0.0.1.1604628099
Xcode: N/A

I don't remember explicitly installing homebrew with a shallow clone, so I assume that it was the default at one point. This commit: 10e7316 bans the use of such shallow clones with just a message to run a command. Would most users know that they had a shallow clone in the first place, or why the command needs to be run, or what it will do? Additionally, no reference to the shallow clone being a problem exists in brew doctor.

Given that it's just one command, couldn't it be run automatically on update, since brew updating won't work anyway until it's been done?

@jonchang jonchang closed this as completed Dec 5, 2020
@jonchang
Copy link
Contributor

jonchang commented Dec 5, 2020

This is to avoid automatically updating CI pipelines which are incorrectly using shallow clones. Please search for pull requests that explain things before filing issues: #9383 (comment)

@gotyaoi
Copy link
Author

gotyaoi commented Dec 5, 2020

Sorry, didn't see any reference to the PR in the commit, my bad. Given the comment in the PR: "I think this being documented in the PR is fine for now." do you think linking to the PR in the error message would be appropriate? ie. "see #9383 for more info" or something?

@MikeMcQuaid
Copy link
Member

I've opened #9447 to improve the message here and explain wy this won't be done automatically.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Jan 7, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Jan 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

4 participants