-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Conversation
This is cool. I'll review. Adam let me know if you have concerns, etc. |
Thanks for taking the time to look at my code Max! |
One thing that just crossed my mind is that I should include some method of flagging kegs as being installed by @adamv, @MikeMcQuaid thoughts? |
This can be worked into the mechanism Homebrew will use to save options from normal installs, the metadata file. I'm working on it in a branch, but need to rebase it against master; the install-name fixes are causing me a slight conflict due to a change in indent level. |
In the spirit of homebrew this kind of metadata should be a new folder and symlinks. I mean the tappedbrews not the options. The options would have to be in some metadata store. |
I agree with @mxcl. I'm wary of making brew-tap too good an external command as it might limit the likelihood of us making a "proper" integrated solution (or it could be start to be the base for one). |
I agree that that folders and symlinks would be the best system. However, currently Currently I was thinking of something quick and dirty, like touching an
From the beginning of this project I have been hoping that |
Still integrating this, haven't forgotten, I promise. Max x |
Sounds good, let me know if you have any questions or concerns. |
I'm taking a shot at integrating |
Notes from my attempt to install brew tap:
But I have forked homebrew-alt: https://github.com/samueljohn/homebrew-alt There I am stuck right now. |
We hit up the GitHub API to retrieve the Homebrew-alt fork network---this in turn is used to determine the list of available repositories. The weird thing is that you show up if the V2 API is used to retrieve the forks, but not if the V3 API is used---so there must be some GitHub synching issue going on. I'll send them a support request. |
@Sharpie |
Is it possible to have a repository that is outside of the Homebrew-alt fork network as a taproom? |
There is no explicit support for it, but you should be able to add one manually:
Then you should be able to install formulae:
I would like to make this easier in the future but it is beyond the scope of my current efforts. |
Is there anything I can do to help with this effort? I'd like to have homebrew-alt be a first class citizen... :-) |
I am trying brew tap. Works good! One issue, perhaps:
When in fact there is my scipy formula and brew tap install scipy works. And brew tap which also works:
I added my homebrew-alt for via |
This pull request is essentially complete (but bug reports are welcomed and needed!) and is inteded as a way for people to add multi-repo support to an existing Homebrew installation without much fuss. First-class support is being developed in #7643. At this point, there is no implementation for searching. |
@Sharpie, I have another strange issue. Then What am I doing wrong? |
More:
|
@samueljohn I get the same thing (
|
Also, is there a way to depend on formula in tap? For example, say formula Because:
Gives me:
Is there a different syntax for depending on tap formulae? Something like:
UPDATE: I figure this out myself:
Works. Sorry for the noise. |
This pull request doesn't seem to apply cleanly on a fresh vm. To reproduce:
I get this: https://gist.github.com/1936861 Relavent parts:
I think this commit keeps formula.rb from merging automagically: c4027c4#Library/Homebrew/formula.rb |
Thanks for the report and tracing the problem down---it looks like a simple matter of updating the cross-repo deps code to be compatible with a recent change that added more external deps. I've been traveling all weekend and am coming down with the flu tonight, but I will try to clear this up tomorrow. |
`brew tap` is planned to be a subcommand for "tapping" (checking out) repositories from other "breweries" (GitHub users other than mxcl) and then managing syncs and installs. Initial commit contains an implementation of the Brewery class which is a simple abstraction of a GitHub repository. Brewery instances can query GitHub for information such as branch lists and fork networks through memoized API calls.
New class named Taproom. Instances of taproom represent folders where repositories ("Breweries") are checked out. The list of available repositories is generated from the fork network of a "founding brewery". Adamv's homebrew-alt repository is being used as the prototype founder. The "founding brewery" concept will probably need to be refactored away someday in the name of generalization, but right now it serves as a useful boundary by restricting the list of possible repositories to a well-known quantity. Also added support for what will eventually be the dispatch method of `brew-tap` subcommands. Currently implemented: - list: Prints out a "menu" that lists the available "breweries" - update: Refreshes the menu.
Taproom objects can now report on the breweries they have available and which are on tap (checked out). A Taproom can also place a brewery on tap by cloning it into the Taproom path. Library/Taproom was chosen as the default taproom path which required adding an entry to the master .gitignore file. This could probably be avoided by using HOMEBREW_PREFIX/Taproom but Library/Taproom seems more logical as it is next to the master Formula directory.
Two alternate repositories may provide different formulae for the same software. `brew-tap` will now accepts forumla names of the following form: repo/[subdirectories]/formula Case-sensitive partial matching is also used. For example, the following formula specification: adam/gcc Would cause the formula search to use the following glob: TAPROOM_PATH/adam*/**/gcc.rb Specifying subdirectories also works: adam/dupe/gcc => TAPROOM_PATH/adam*/dup*/**/gcc.rb Both of these globs resolve to the following path: TAPROOM_PATH/adamv-homebrew-alt/duplicates/gcc.rb
Partial matching of brewery names is now case sensitive. This was done for consistancy as the partial matching used for formula names is case sensitive and there is no easy way to make it insensitive.
brew-tap can now loop over each tapped repository and perform an operation similar to brew update. A modified version of the RefreshBrew class is used, so the update operation is summarized in a similar way.
The menu is now separated into tapped and untapped repositories.
Various stylistic and organizational tweaks. Trimmed some unused material.
Made usage more concise and clarified examples in manpage.
The GitHub API now returns `master_branch` in repository summaries. This allows the use of a better, simpler method for discovering the name of this branch.
Small tweak to Homebrew core to allow for a new `:alt` external dependency type. Dependencies flagged as `:alt` will be ignored by Homebrew core commands and so will not raise errors.
`brew-tap` now scans alternate formulae for dependencies of the form: depends_on 'repo/formula' => :alt If `repo` has not been added to the taproom, it is cloned. The original formula along with it's dependencies are then formed into a correctly sorted list for `brew install`
Now that the newest GitHub API offers repository access, brew-tap should use it instead of the V2 API.
The method by which `RefreshBrew` detects changes was improved by: Homebrew/legacy-homebrew@cae8f9e This patch upgrades the version of `RefreshBrew` used by `brew-tap` to be compatible.
Normally `brew-tap` expands all formula arguments into paths to formula files and then recalls `brew`. This is inappropriate for `brew uninstall` so we pass formula names unchanged.
The mechanics of how `brew update` obtains a diff changed which requires a small update to `brew-tap update`.
Unlike version 2, v3 of the GitHub API splits long lists of responses into pages. So, we may need multiple requests in order to retrieve the whole fork network. The code used to locate the "last page" is a bit hacky---but I can't think of anything better at the moment.
Just had my University firewall hose `git:` connections.
Allright, this should apply cleanly on master again. I did a rebase followed by a force-push, which is something that I have been trying to avoid in this pull request---but there was no other obvious way to straighten this out. |
+1 |
@mxcl pushed his brew-tap, so closing this |
brew-tap
is an external command that brings multi-repo support to Homebrew by making it easy to add alternate repositories, update them, and install the formulae they contain. Currently, the tool is set up to use repositories in the fork network of Adam's homebrew-alt:https://github.com/adamv/homebrew-alt/network
See the manpage for full usage details:
https://raw.github.com/Sharpie/homebrew/brew-tap/Library/Contributions/manpages/brew-tap.1.md
When creating
brew-tap
I tried very hard to integrate with existing Homebrew code and style. However, one small change was required to the core fileformula.rb
in order to enable dependency resolution among formulae in alternate repositories by adding an:alt
type todepends_on
. This dependency type is ignored bybrew
, but used bybrew-tap
. See the HDF-EOS2 formula for an example of:alt
usage:https://github.com/Sharpie/homebrew-science/blob/for-science/scientific/hdf-eos2.rb#L24
I have been using this subcommand for a couple of months and I think it would be a great addition to Homebrew!