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>
:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.
ClosesHomebrew/homebrew#7859.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Also adjust output text slightly for prettiness.
A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
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 fixHomebrew/homebrew#7613.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
`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.
ClosesHomebrew/homebrew#7159.
Signed-off-by: Max Howell <max@methylblue.com>
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.
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 :)
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>
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.)
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.)
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.
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.
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.
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>
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>