Skip to content
chadoh edited this page May 19, 2012 · 7 revisions

A list of things that would be neat to have in Homebrew. Feel free to fork Homebrew and add one yourself!

This is an unofficial list. Don’t expect work you do to always be pulled in.

Install hooks

Sometimes it might be necessary to hook into various parts of the installation process. Various hooks would be good to have to allow as much flexibility as possible.

Examples:

  • before_dependency_resolution
  • after_dependency_resolution
  • before_install
  • after_install
  • before_symlink
  • after_symlink
  • before_uninstall
  • before_unsymlink
  • after_unsymlink
  • after_uninstall

I pretty much disagree with all of these
--mxcl

Some hooks like before_install would be nice as they would let one do things such as set up the environment, then do debugging and testing with brew install -i without worrying about duplicating Homebrew’s environment settings.
--Sharpie

@mxcl : Could you elaborate on why you disagree? (I’m neutral, but I think the details are important in this case.)
--Zearin

Multiple OS integration

  • Split out code that's tied to Mac into something like os/mac.rb. (Other things like determining cores, memory, arch types, etc. will be different.)
  • Add support for other OSes (example: os/ubuntu.rb)
  • May be worth adding a super class for Linux (os/linux.rb) for (most) other OS files to inherit from
  • A file called os.rb in the homebrew source root would determine which OS is being used, and include the file needed

I disagree with this one. Homebrew was made for OS X because it doesn't have a package manager built-in. Ubuntu (and pretty much every Linux distro) already does.
-- mrman208

Actually having a distinction between system and user packages is also something desirable on Ubuntu. System packages are often quite old and require sysadmin rights to be installed. As for OSX, you get new versions trough security updates or release updates. Developers often need fresher packages.
-- zimbatm

Also, the biggest reason I hesitate to switch to Ubuntu from OSX right now is because Homebrew is so elegant and simple and fast and easy compared to Aptitude. brew install postgresql. Done! Whereas with Aptitude you have to at least sudo aptitude install postgresql postgresql-client postgresql-contrib ("at least" because it's still not working on my Ubuntu VM!).
-- chadoh

Multiple Version Support

  • Add support for installing multiple versions of a formula.
  • When you install for the first time, it installs as per normal.
  • If a second install is attempted, it says 'already installed' if the version is the same
  • If the version is different (i.e. after an update of Homebrew), it should unlink the old version, and install/link the new version
  • A new brew switch [formula] command be added. It'll list the available versions for the formula, and ask for numeric input (which correspond to versions). The command will unlink the currently linked version, and link the selected version.
  • Homebrew doesn't know which formula is currently linked when multiple ones exist. Code needs to be added to make it aware. Maybe symlink a 'current' dir to the current links formula folder.
  • Similar function of the brew switch command be applied to the brew uninstall command (prompt which one be uninstall if multiple versions exist). If uninstalling the currently linked one, it'll link to the latest version.

This should get high priority. Essentially, once you have multiple versions, much of homebrew's functionality is gone (no uninstall, no unlinking)
--themiwi

there are some important questions that come into play once you have multiple version support though, e.g. doing a good job managing dependencies and version constraints on those dependencies. A lot of tools don't quite mange to do a good properly computing the transitive set of dependencies when multiple versions are supported, and it would be fantastic if we can get homebrew to do that "right". Eg for certain libs and apps, there may not only be version contraints, but also some set of flags where the set of valid combinations form a partial order or lattice, and if certain dependencies need to be rebuilt to have the right flags, it should as least be able to determine that, even if a "i know what i'm doing" promise is needed from the user before it forges ahead.
--Cartazio

i'm not an active homebrew contributor, but once people are working on the multiversion stuff, I'd really like to help out with the version constraint solver stuff if other folks deem it worth including.
--Cartazio

+1!
--rweng


Completed Wishlist Items

The following items from this page have been completed:

✔ Install Tests

Done: Formulae may define a def test method, which can be run with brew test foo. Note: This is a post-install test (“sanity check”)—not a pre-install test (“installable check”).

✔ Aliases

Done: Aliases have been supported for a while. They're implemented as relative symlinks from Library/Alias to Library/Formula.