librelist archives

« back to archive

Re: Multiple versions of packages question

Re: Multiple versions of packages question

From:
Max Howell
Date:
2011-01-24 @ 23:35
The Homebrew way would be to edit the formula for silk. `brew edit silk`. 
And then update it to the new version.


If you want to modify the source before the build you can use `brew 
install -i silk`. Though your changes are temporary, and specific to that 
build. If you want to do this consistently then you can make it checkout 
the repository with a --HEAD installation. Though the HEAD feature isn't 
really designed for this usage.


However Homebrew has a DIY installation feature, so you can install 
anything from anywhere. This is all documented on the wiki. Installation 
is just moving and symlinking files, so it's relatively easy to make 
things work how you need them to.


Downloads are kept in ~/Library/Caches/Homebrew as the --cache command 
will tell you. This is documented somewhere I think, though I may be 
wrong.
On Monday, 24 January 2011 at 23:26, John McHugh wrote:

> I am brand new to homebrew - started today.
> 
> One of the systems I use is the SiLK tools from CERT. There is a silk 
formula, but it is several versions behind current releases, pointing to 
2.4.0
> 
> pre brew, I installed 2.4.1 and I now want to install 2.4.4
> 
> In my old world, I would create a directory in usr/local/src called 
silk2.4.4, bring in the package, do a bit of magic with configure options 
to keep installed versions from stepping on each other and and do the 
usual ./configuew; make; make install stuff.
> 
> I copied the silk formula to a file I named silk2.4.4, fixed up the 
fetch url and md5 as well as the configure options and tried a 
> 
> bref fetch silk2.4.4
> 
> brew complained 
> 
> Error: class "Silk244" expected but not found in silk2.4.4.rb
> Double-check the name of the class in that formula.
> Error: No available formula for silk2.4.4
> 
> so i changed the class to silk2.4.4 which resulted in 
> 
> Error: /usr/local/Library/Formula/silk2.4.4.rb:3: no .<digit> floating 
literal anymore; put 0 before dot
> class Silk2.4.4 <Formula
>  ^
> /usr/local/Library/Formula/silk2.4.4.rb:3: syntax error, unexpected tFLOAT
> class Silk2.4.4 <Formula
>  ^
> /usr/local/Library/Formula/silk2.4.4.rb:27: syntax error, unexpected 
kEND, expecting $end
> Please follow the instructions to report this bug at: 
> https://github.com/mxcl/homebrew/wiki/new-issue
> /usr/local/Library/Homebrew/formula.rb:324:in `require'
> /usr/local/Library/Homebrew/formula.rb:324:in `factory'
> /usr/local/Library/Homebrew/extend/ARGV.rb:34:in `formulae'
> /usr/local/Library/Homebrew/extend/ARGV.rb:34:in `map'
> /usr/local/Library/Homebrew/extend/ARGV.rb:34:in `formulae'
> /usr/local/Library/Contributions/examples/brew-fetch.rb:6
> /usr/local/bin/brew:339:in `require'
> /usr/local/bin/brew:339
> 
> ======
> 
> OK, so I did not follow the hint given by the class Silk244 message, but
this seems a bit extreme. Changing the class to Silk244 seems to fetch and
checksum the right file.
> 
> The more general question is "Is a separate formula needed for each 
version, and if so, what it naming conventions should be followed for 
classes, etc.
> The one implied has the potential to give the same class for versions 
22.4 and 2.24 - a bit out in left field, but possible. 
> 
> =======
> 
> In addition, I often modify the source code between downloading and 
building. I can't seem to figure out where the fetched file went. It does 
not appear to be in either the cellar or in /tmp. What I'd really like is 
something that would fetch and unpack, let me work on things, then do a 
"brew build <formula>" and have it continue the process.
> 
> any advice?
> 
> John McHugh
> 
> 
>