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

Unable to upgrade the package when it is downgraded to the same version #7507

Closed
3 tasks done
mingtsay opened this issue May 5, 2020 · 1 comment · Fixed by #7534
Closed
3 tasks done

Unable to upgrade the package when it is downgraded to the same version #7507

mingtsay opened this issue May 5, 2020 · 1 comment · Fixed by #7534
Labels
outdated PR was locked due to age

Comments

@mingtsay
Copy link

mingtsay commented May 5, 2020

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)

This error is occurred when I was dealing with this issue:
Homebrew/homebrew-core#54260

What happened (include command output)

It is upgraded to the same version.

And the error message is shown up:
Error: File exists @ dir_s_mkdir - /usr/local/opt/bison/.brew

Command output
==> Upgrading 1 outdated package:
bison 3.5.4 -> 3.5.4
==> Upgrading bison 3.5.4 -> 3.5.4
==> Downloading https://ftp.gnu.org/gnu/bison/bison-3.5.4.tar.xz
Already downloaded: /Users/mt/Library/Caches/Homebrew/downloads/0cd0b972eeb61898d808838afbf7d7142f74bab484acb305448d24e60dd18dce--bison-3.5.4.tar.xz
==> ./configure --prefix=/usr/local/Cellar/bison/3.5.4
==> make install
Error: File exists @ dir_s_mkdir - /usr/local/opt/bison/.brew

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

Reproduce steps:

  1. cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  2. brew remove bison to ensure you don't have bison installed.
  3. git checkout 348a8a58f2bc665f5c75be6febefc23f13605bc4 bison.rb for bison version 3.5.4
  4. HOMEBREW_NO_AUTO_UPDATE=1 brew install bison to install the specified version of bison.
  5. git checkout 0058caaa5159082c9ec689983925dd79c5b21639 bison.rb for bison version 3.5.4 (downgraded)
  6. HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade bison to upgrade bison to the downgraded one.
Reproduce command for copy and paste
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
brew remove bison
git checkout 348a8a58f2bc665f5c75be6febefc23f13605bc4 bison.rb
HOMEBREW_NO_AUTO_UPDATE=1  brew install bison
git checkout 0058caaa5159082c9ec689983925dd79c5b21639 bison.rb
HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade bison

Cleaning up:

  1. cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  2. git reset --hard HEAD to switch to the latest Formula list and ignore changes.
  3. brew remove bison && brew install bison to reinstall latest bison
Cleaning up command for copy and paste
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
git reset --hard HEAD
brew remove bison && brew install bison
@MikeMcQuaid
Copy link
Member

Opened a PR to fix this in #7534.

Reproduce steps:

These were super well written and made it really easy to fix this issue. Thanks @mingtsay!

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 11, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 11, 2020
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

Successfully merging a pull request may close this issue.

3 participants