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

Install specific package version with a help of Brewfile #547

Closed
niparx opened this issue Aug 27, 2019 · 4 comments
Closed

Install specific package version with a help of Brewfile #547

niparx opened this issue Aug 27, 2019 · 4 comments
Labels

Comments

@niparx
Copy link

niparx commented Aug 27, 2019

I would like to have a feature to install specific version of a package. And to define it in Brewfile. Something like this:

#CMake 3.14.4
brew "https://raw.githubusercontent.com/Homebrew/homebrew-core/3d7d9f99f1b273c469120eebf765119369f1ae00/Formula/cmake.rb"

Currently it won't work. brew makes url lowercase, which, at the end won't be valid formula and Formula in url makes the difference:

$ brew bundle -v
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Error: Failure while executing; `/usr/bin/curl -q --show-error --user-agent Homebrew/2.1.11\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.14.6\)\ curl/7.54.0 --fail --location --remote-time --continue-at 0 --output /Users/user/Library/Caches/Homebrew/Formula/cmake.rb https://raw.githubusercontent.com/homebrew/homebrew-core/3d7d9f99f1b273c469120eebf765119369f1ae00/formula/cmake.rb` exited with 22. Here's the output:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found

May be, if that would be fixed, we would be able to install specific versions of packages in Brewfile

@MikeMcQuaid
Copy link
Member

From the README (https://github.com/Homebrew/homebrew-bundle#note):

Homebrew does not support installing specific versions of a library, only the most recent one, so there is no good mechanism for storing installed versions in a .lock file.

If your software needs specific versions then perhaps you'll want to look at using Vagrant to better match your development and production environments.

If you really, really want to use specific versions forever: use brew extract and put them in your own tap. We will never support installing from specific URLs like that.

@figroc
Copy link

figroc commented Dec 3, 2019

How about adding extract command to Brewfile? @MikeMcQuaid

@MikeMcQuaid
Copy link
Member

@figroc I can't see how that would work? We don't want to make it extremely easy to sit on old outdated versions because it's generally A Bad Idea.

@figroc
Copy link

figroc commented Dec 3, 2019

In fact, extract works just like tap. I come across the versioning issue because of the formula protobuf. The version 3.11.0 of protobuf breaks my cmake project. I have no choice but stick with the version 3.10.x of protobuf (the 3rd party dependency).

@lock lock bot added the outdated label Jan 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants