446 Commits

Author SHA1 Message Date
Adam Vandenberg
f2b43831f5 Mercurial 1.9.3 2011-11-15 09:03:12 -08:00
Misty De Meo
1e17a8fb0b Add UnsafeSubversionDownloadStrategy
There was an UnsafeSubversionDownloadStrategy in a single formula
before, but a) it broke against later changes to
SubversionDownloadStrategy, and b) wasn't available to other formula.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-10-22 08:04:26 -07:00
Daniel Bingham
fbd0d7ec7b Fix :sha spec so that it actually checks out the SHA
:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.

Closes Homebrew/homebrew#7859.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-03 18:45:25 -05:00
Max Howell
6bd47cf0f9 Only try mirrors for CurlDownloadStrategies
Also adjust output text slightly for prettiness.

A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
2011-09-19 23:30:10 +01:00
Jack Nagel
d95e7079a2 Reset to remote master when updating git clones
When installing with --HEAD, cached repo clones do "git fetch origin"
followed by "git reset --hard". This will only reset the working tree
and index to the state of the local HEAD, but Homebrew will think it's
updated and install anyway. "git reset --hard origin/master" will
achieve the desired result.

Should fix Homebrew/homebrew#7613.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 22:26:36 -05:00
Dave Bayer
79873bf44a fix: svn update doesn't take url argument
`svn up` doesn't take url argument; compare `svn help up` to `svn help checkout`
Apparently `svn up` can ignore this argument (not documented), but providing this
argument could confuse code readers into believing that changing the url will
switch the branch. It doesn't; the argument is ignored.

This fix was relayed to me, but I've studied it further before posting.
It is related to the bug where --HEAD installs reuse the wrong cache.
Reading the former code, one might hope that providing a changed URL would
have `svn up` change branches. It doesn't; the url was ignored.

Closes Homebrew/homebrew#7159.

Signed-off-by: Max Howell <max@methylblue.com>
2011-09-01 14:03:01 +01:00
Dave Bayer
4743bc96e2 Fixes Homebrew/homebrew#7114; Cache confuses --HEAD and non--HEAD svn installs
Signed-off-by: Max Howell <max@methylblue.com>
2011-09-01 14:01:41 +01:00
Max Howell
1f5a39b977 git reset --hard after fetch; Fixes Homebrew/homebrew#7124
I believe this fixes it though I confess I didn't test. The guy who opened this issue is the expert.
2011-08-26 15:06:24 +01:00
Ben Burkert
f54a30a534 Only clone with a depth when targeting HEAD or a tag.
Closes Homebrew/homebrew#7101.

Signed-off-by: Max Howell <max@methylblue.com>
2011-08-26 14:31:49 +01:00
Max Howell
6ac0a28523 Implement bottles again
Bottles now pour purely, without doing all the other unnecessary stuff that happened before the `brew upgrade` code shuffle.

Formula.pourable? removed since it was install-specific metadata and not related to the formula itself. Now all such logic is in the FormulaInstaller which is much cleaner.

I also changed the bottle cache location to the normal directory and added a .bottle pre-extension. Thus you can see everything in one directory without messing about.
2011-08-24 22:30:43 +01:00
Max Howell
924f92300f Fix cache extension for github tarballs 2011-07-29 11:58:41 +01:00
Max Howell
72889ea6a8 Set origin remote URL when updating git clones
Thus the url we use can change.

This only works provided the urls both contain git repos with the same blobs. But this should always be true.
2011-07-27 12:51:16 +01:00
Max Howell
f3702b475b Raise if mirror can’t be determined
Adjust mirror ohai slightly.
2011-07-27 10:56:59 +01:00
Jan Lehnardt
c576f4088c Detect Apache mirror system and parse out the closest mirror.
All Apache Formulae should be updated to use the closer.vgi script
to specify downloads rather than a random mirror that could be out
of date or compromised. Apache's closer.cgi does periodic health
checks.

The base URL for the mirror system is

  http://www.apache.org/dyn/closer.cgi?path=#{filepath}

e.g.:

  http://www.apache.org/dyn/closer.cgi?path=/couchdb/1.0.3/apache-couchdb-1.0.3.tar.gz

Note: The addition of the "Actually downloading..." message is sub-optimal
as the message should probably be emitted in _fetch() rather than fetch(),
but I didn't want to change the way Homebrew works today, so I'm leaving
this for mxcl & team to sort out or adopt :)
2011-07-27 09:48:35 +01:00
Mike McQuaid
939a530ddc Make bottle path. 2011-06-21 19:04:18 +01:00
Mike McQuaid
31dea3b800 Add changes to Homebrew internals for bottling. 2011-06-08 22:19:10 +01:00
Adam Vandenberg
206c370d74 Move gz-only strategy into core. 2011-05-19 07:37:24 -07:00
pascalbertrand
11f3fca867 GitHub - use git for smart https repos
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-04-04 14:09:41 -07:00
Adam Vandenberg
7c4289d446 Fix inheritance style in download strats. 2011-03-28 19:53:43 -07:00
Simon COURTOIS
846087d585 Removing svn+ when using svn+http to avoid Undefined tunnel scheme error
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-22 10:18:23 -07:00
Adam Vandenberg
ebb6a98d67 Use --depth 1 more conservatively 2011-03-19 14:30:35 -07:00
Adam Vandenberg
5f5fdb3284 Fix regex for svn+http
Fixes Homebrew/homebrew#4683
2011-03-15 09:41:23 -07:00
Armando Di Cianno
79d8d16184 use "git clone --depth 1"
Prefer a shallow clone for builds from git repos, as we don't need all
the historical stuff.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-12 11:55:12 -08:00
Max Howell
f43be169fe Stop recommending our pip
Seeing as the pip formula doesn't recommend pip anymore, we should stop telling people to use it :P
2011-03-12 11:55:06 -08:00
Jamie Macey
b7fa82b28d fix warnings: ambiguous splat
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:50:54 -07:00
Jamie Macey
1e41264f42 fix warnings: ambiguous first arg
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:47:44 -07:00
Adam Vandenberg
06f484d1e5 typo in comment 2010-10-19 21:52:54 -07:00
Tianyi Cui
915b018e15 Added FossilDownloadStrategy (Fossil SCM support)
This will enable downloading source repository using fossil SCM.
For example, formulae `fossil` and `mongrel2` can have HEAD version.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-03 09:11:14 -07:00
Adam Vandenberg
8a60d852b3 Check git repos for validity before updating.
If you `brew install erlang` and then control-C during the git clone,
you can leave your cloned repo in an invalid state.

This change does a "git status" on the clone if it exists, and nukes
it if the status is invalid (forcing a clean clone.)
2010-09-24 07:50:20 -07:00
Adam Vandenberg
b2cde10e7e ImageMagick - use svn repo instead of tarballs
The ImageMagick mirrors like to drop old tarballs, which means that our
formula breaks whenever the version we're using disappears.

So I've switched to using their SVN repo (and added a --HEAD build.)

Caveat: Their SVN repo is only served over https, with a bad cert,
so this brew know has a custom SVN download strategy that auto-accepts
that cert.

If this bothers you, get ImageMagick to fix their cert upstream (or
let us know where a stable tarball mirror lives.)
2010-09-21 21:28:29 -07:00
Adam Vandenberg
d518fca81c Fetch new tags for git repos when cached. 2010-09-13 15:00:54 -07:00
Adam Vandenberg
0a018deb93 Don't version VCS checkout directories.
While tarballs are versioned to prevent conflicts when newer ones are downloaded,
we shouldn't be versioning the name of the VCS checkout when a formula uses
"HEAD" or a stable commit.

Append the name of the vcs system to the checkout path, in case a project changes
vcs providers, to prevent future conflicts.
2010-08-07 11:32:29 -07:00
Adam Vandenberg
78ca4f35fb GitHub - use git for smart http repos 2010-07-23 21:39:12 -07:00
Adam Vandenberg
984d0bd05d CurlUnsafeDownloadStrategy
This Download Strategy is provided for use with sites that
only provide HTTPS and also have a broken cert.
Try not to need this, as we probably won't accept the forulae
into trunk.
2010-07-10 12:00:11 -07:00
Adam Vandenberg
d637e0a139 brew doctor and GitDownloadStrategy now check for Git.
GitDownloadStrategy now fails if git isn't in the path, same as other
VCS strategies.

`brew doctor` will also warn if Git isn't installed.
2010-07-09 07:15:28 -07:00
Adam Vandenberg
4c2d3e1f7f Improved Subversion support.
Homebrew will now use the svn binary pointed to by HOMEBREW_SVN if set,
use a Homebrew-installed svn if present, finally falling back to the
system-provided svn binary.

If a formula (mplayer) requires a newer version of Subversion than what
Leopard provides, it can use the "StrictSubversionDownloadStrategy"
download strategy to warn the user.

These changes also fix an issue with forcing exports not working on a
stock Leopard subversion, but letting the user either specify a specific
binary or install Subversion via Homebrew and pick that up instead.
2010-07-08 22:45:03 -07:00
Adam Vandenberg
7c4661edcf Comment the detect_download_strategy patterns. 2010-07-08 22:41:51 -07:00
Adam Vandenberg
aac072c47a Tweak CurlPostDownloadStrategy 2010-06-30 10:21:56 -07:00
Adam Vandenberg
4490b739d5 Add flat-.pkg support to CurlDownloadStrategy 2010-06-30 10:14:33 -07:00
Adam Vandenberg
501fb844ab Use cp, not mv, to keep download in cache. 2010-06-28 13:14:50 -07:00
Adam Vandenberg
55b683b59a Add a download strategy that uses HTTP POST 2010-06-25 19:13:20 -07:00
Tuncer Ayaz
914a068dc8 MercurialDownloadStrategy: pull and update instead of update only 2010-06-10 12:57:20 -07:00
Tuncer Ayaz
ced8edacdc MercurialDownloadStrategy: pull and update instead of update only 2010-06-10 12:30:47 -07:00
Adam Vandenberg
9f9219a142 Subversion now supports revisions on externals.
A formula using svn can now provide a spec:
    :revisions => {...revision numbers...}
that contains a mapping of revision numbers to use
for externals.

The name of the external is keyed to the revision to
use for that external.

The symbol :trunk should be used to specify the reivsion
of the main repo.

An example from the Ffmpeg formula:
    head 'svn://svn.ffmpeg.org/ffmpeg/trunk',
        :revisions => { :trunk => 22916, 'libswscale' => 31045 }

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-08 12:36:03 -07:00
Fergal Hainey
9f2fc2ab3b More efficient SVN download that handles externals
Now makes use of `svn up` to make cache act like
a cache. Externals without a revision specified
are now checked out at HEAD, whereas before they
were ignored. Escaping arguments to backticks.
Making sure main repo is checked out before the
externals.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-08 12:35:31 -07:00
Adam Vandenberg
f08431b5a1 Add --cache support to hg and bzr. 2010-06-07 14:15:45 -07:00
Adam Vandenberg
eb30a8555b Add cache location support to CVS.
This allows formulaes which use CVS to support:
  brew --cache [formula]
2010-06-07 10:01:15 -07:00
Adam Vandenberg
2563b32bb6 Allow SVN to report cache location. 2010-05-07 10:38:48 -07:00
Adam Vandenberg
38d969ea7c Let GitDownloadStrategy report its cache location. 2010-05-05 21:20:11 -07:00
Adam Vandenberg
72ef9f4aaa Quote prefix for git submodules. Fixes Homebrew/homebrew#1009 2010-04-08 21:01:09 -07:00