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 compatibility with git 2.37 #13521
Comments
p.s. 1. I had to select that I resolved "brew doctor issues" while it's not true. But these warns are entirely irrelevant. p.s. 2. Why do you drop support for something working? For instance, Qemu 6.2 build is completely gone, while the new version is broken. |
I'm not entirely sure if it's about the git version, but that's the only thing I recently changed. |
I can't reproduce this.
|
Please resolve these |
We have at least one bug here because ""Homebrew update process is already in progress" is cryptic error, one that is often a false-positive (leftover lockfile). Brew does not say which is the file lock even if you run with IMHO, it is unreasonable to expect users to know the location of the lock file, especially as this one is different depending on the architecture. |
@ssbarnea I can reopen this if you're able to fill in the issue template. |
The root cause of @dmilith's issue is that he enabled ps -p $(lsof -t +d $(brew --prefix)/var/homebrew/locks) Which will show something like this if
I worked around this by setting git config --file $HOMEBREW_REPOSITORY/.git/config --replace-all core.fsmonitor false Ideally Homebrew would set this git config on initial repo creation. |
Is there a way to stop the daemon so it releases the lock? |
This should do it: kill $(lsof -t +d $(brew --prefix)/var/homebrew/locks) |
Is there a way to stop only the daemon instead of killing everything that might hold a lock (e.g. a currently running Note that this is something that should be runnable while doing |
pushd $HOMEBREW_REPOSITORY; git fsmonitor--daemon stop; popd |
Since I enabled that daemon brew become a PITA to use, I always endup with lock leftovers and brew error does not even mention where are these files and how you can remove them. At least, it should just include the clean command line as a suggestion, so you can copy/paste it. |
Thanks, @mjgardner. Can you test out this patch? diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 0269d73ed..1aed9905c 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -556,6 +556,12 @@ EOS
[[ -d "${DIR}/.git" ]] || continue
cd "${DIR}" || continue
+ # Git's fsmonitor daemon will not release our lock unless we stop it.
+ if git fsmonitor--daemon status &>/dev/null
+ then
+ git fsmonitor--daemon stop 2>/dev/null
+ fi
+
if ! git config --local --get remote.origin.url &>/dev/null
then
opoo "No remote 'origin' in ${DIR}, skipping update!"
Apply it in |
Git's fsmonitor daemon will prevent our update lock file from being released if it is running before a `brew update`. Let's fix that by stopping it whenever necessary so our update lock is released upon completion. Fixes Homebrew#13521.
I tried to test my patch, but I can't reproduce the problem it's meant to fix. I set |
A recent update must have removed my
I'll test @carlocab's patch tomorrow. |
I realized that my workaround didn't account for taps. Here's a replacement that also stops any extant fsmonitor daemons: for tap in '' $(brew tap)
do
pushd $(brew --repo $tap) &&
git fsmonitor--daemon stop
git config --local --replace-all core.fsmonitor false
popd
done |
Git's fsmonitor daemon will prevent our update lock file from being released if it is running before a `brew update`. Let's fix that by stopping it whenever necessary so our update lock is released upon completion. Fixes Homebrew#13521.
brew config
outputbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Seems like after
brew upgrade
the file: /opt/homebrew/var/homebrew/locks/update remains and until I delete it manually I get:What happened (include all command output)?
Error: Another active Homebrew update process is already in progress.
Please wait for it to finish or terminate it to continue.
What did you expect to happen?
well,
brew upgrade
should remove the file after it's done?Step-by-step reproduction instructions (by running
brew
commands)# append "fsmonitor = true" in [core] of ~/.gitconfig brew upgrade
The text was updated successfully, but these errors were encountered: