Skip to content
mrman208 edited this page May 27, 2011 · 7 revisions

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

This isn't an official list. Don't expect work you do to always be pulled in.

Installation

Install tests

  • Done: You can now define a def test method and then run brew test foo. Note that this is a post-install smoke test—not a "prevent installation" test.

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 the homebrew 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

Aliases

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

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 you try to install it again, 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, eg 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

Clone this wiki locally