Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
cartazio edited this page Sep 13, 2010 · 10 revisions

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

This isn’t an official list, so don’t expect work you do to always be pulled in.

  • Installation 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 and not a “prevent installation” test.
  • Installation 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.
      • 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
  • Multiple OS integration
    • Split out code that is tied to Mac into a os/mac.rb file or similar (various things like determining cores, memory, arch types etc will be different)
    • Add support for other Operating systems, example os/ubuntu.rb
      • May be worth adding a super class for linux (os/linux.rb) which most operating system files can inherit from
    • A file called os.rb in the homebrew source root would determine which OS is being used, and include the file needed
  • Aliases
    • Done: Aliases have been supported for a while; currently they are implemented as relative symlinks from Library/Alias to Library/Formula.
  • Multiple version support
    • Add support for multiple versions of formula installed.
    • 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