aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/deps.rb14
-rw-r--r--Library/Homebrew/cmd/install.rb3
-rw-r--r--Library/Homebrew/dev-cmd/audit.rb38
-rw-r--r--Library/Homebrew/formula_installer.rb1
-rw-r--r--Library/Homebrew/utils/inreplace.rb3
-rw-r--r--docs/brew.1.html5
-rw-r--r--manpages/brew.13
7 files changed, 52 insertions, 15 deletions
diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb
index b5240b2c9..205cbe172 100644
--- a/Library/Homebrew/cmd/deps.rb
+++ b/Library/Homebrew/cmd/deps.rb
@@ -143,15 +143,23 @@ module Homebrew
def recursive_deps_tree(f, prefix)
reqs = f.requirements.select(&:default_formula?)
+ deps = f.deps.default
max = reqs.length - 1
reqs.each_with_index do |req, i|
- chr = i == max ? "└──" : "├──"
+ chr = if i == max && deps.empty?
+ "└──"
+ else
+ "├──"
+ end
puts prefix + "#{chr} :#{dep_display_name(req.to_dependency)}"
end
- deps = f.deps.default
max = deps.length - 1
deps.each_with_index do |dep, i|
- chr = i == max ? "└──" : "├──"
+ chr = if i == max
+ "└──"
+ else
+ "├──"
+ end
prefix_ext = i == max ? " " : "│ "
puts prefix + "#{chr} #{dep_display_name(dep)}"
recursive_deps_tree(Formulary.factory(dep.name), prefix + prefix_ext)
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 6f578caf6..fbfe46e71 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -44,9 +44,6 @@
#: If `--keep-tmp` is passed, the temporary files created during installation
#: are not deleted.
#:
-#: To install a newer version of HEAD use
-#: `brew rm <foo> && brew install --HEAD <foo>`.
-#:
#: * `install` `--interactive` [`--git`] <formula>:
#: Download and patch <formula>, then open a shell. This allows the user to
#: run `./configure --help` and otherwise determine how to turn the software
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb
index 744aa6fbe..88d9a535c 100644
--- a/Library/Homebrew/dev-cmd/audit.rb
+++ b/Library/Homebrew/dev-cmd/audit.rb
@@ -678,11 +678,47 @@ class FormulaAuditor
end
end
+ unstable_whitelist = %w[
+ aalib 1.4rc5
+ automysqlbackup 3.0-rc6
+ aview 1.3.0rc1
+ distcc 3.2rc1
+ elm-format 0.5.2-alpha
+ ftgl 2.1.3-rc5
+ hidapi 0.8.0-rc1
+ libcaca 0.99b19
+ premake 4.4-beta5
+ pwnat 0.3-beta
+ pxz 4.999.9
+ recode 3.7-beta2
+ speexdsp 1.2rc3
+ sqoop 1.4.6
+ tcptraceroute 1.5beta7
+ testssl 2.8rc3
+ tiny-fugue 5.0b8
+ vbindiff 3.0_beta4
+ ].each_slice(2).to_a.map do |formula, version|
+ [formula, version.sub(/\d+$/, "")]
+ end
+
+ gnome_devel_whitelist = %w[
+ gtk-doc 1.25
+ libart 2.3.21
+ pygtkglext 1.1.0
+ ].each_slice(2).to_a.map do |formula, version|
+ [formula, version.split(".")[0..1].join(".")]
+ end
+
stable = formula.stable
case stable && stable.url
when /[\d\._-](alpha|beta|rc\d)/
- problem "Stable version URLs should not contain #{$1}"
+ matched = $1
+ version_prefix = stable.version.to_s.sub(/\d+$/, "")
+ return if unstable_whitelist.include?([formula.name, version_prefix])
+ problem "Stable version URLs should not contain #{matched}"
when %r{download\.gnome\.org/sources}, %r{ftp\.gnome\.org/pub/GNOME/sources}i
+ version_prefix = stable.version.to_s.split(".")[0..1].join(".")
+ return if gnome_devel_whitelist.include?([formula.name, version_prefix])
version = Version.parse(stable.url)
if version >= Version.create("1.0")
minor_version = version.to_s.split(".", 3)[1].to_i
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 24c068460..115d38c45 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -808,6 +808,7 @@ class FormulaInstaller
tab.poured_from_bottle = true
tab.time = Time.now.to_i
tab.head = HOMEBREW_REPOSITORY.git_head
+ tab.source["path"] = formula.specified_path.to_s
tab.write
end
diff --git a/Library/Homebrew/utils/inreplace.rb b/Library/Homebrew/utils/inreplace.rb
index c7557ab41..b4c219f06 100644
--- a/Library/Homebrew/utils/inreplace.rb
+++ b/Library/Homebrew/utils/inreplace.rb
@@ -1,9 +1,10 @@
module Utils
class InreplaceError < RuntimeError
def initialize(errors)
- super errors.inject("inreplace failed\n") do |s, (path, errs)|
+ formatted_errors = errors.inject("inreplace failed\n") do |s, (path, errs)|
s << "#{path}:\n" << errs.map { |e| " #{e}\n" }.join
end
+ super formatted_errors
end
end
diff --git a/docs/brew.1.html b/docs/brew.1.html
index 8ec35ac61..2e036eb55 100644
--- a/docs/brew.1.html
+++ b/docs/brew.1.html
@@ -196,10 +196,7 @@ for installation.</p>
aka master, trunk, unstable.</p>
<p>If <code>--keep-tmp</code> is passed, the temporary files created during installation
-are not deleted.</p>
-
-<p>To install a newer version of HEAD use
-<code>brew rm &lt;foo> &amp;&amp; brew install --HEAD &lt;foo></code>.</p></dd>
+are not deleted.</p></dd>
<dt><code>install</code> <code>--interactive</code> [<code>--git</code>] <var>formula</var></dt><dd><p>Download and patch <var>formula</var>, then open a shell. This allows the user to
run <code>./configure --help</code> and otherwise determine how to turn the software
package into a Homebrew formula.</p>
diff --git a/manpages/brew.1 b/manpages/brew.1
index c3fb89d60..f122337fb 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -258,9 +258,6 @@ If \fB\-\-HEAD\fR is passed, and \fIformula\fR defines it, install the HEAD vers
.IP
If \fB\-\-keep\-tmp\fR is passed, the temporary files created during installation are not deleted\.
.
-.IP
-To install a newer version of HEAD use \fBbrew rm <foo> && brew install \-\-HEAD <foo>\fR\.
-.
.TP
\fBinstall\fR \fB\-\-interactive\fR [\fB\-\-git\fR] \fIformula\fR
Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew formula\.