Closed eric-brechemier closed 8 years ago
Was there any other output? Would be useful to know what part of the process generated that error.
No, that's the only output:
$ brew install sqitch_pg
Error: No such file or directory - /usr/local/README.md
I can give you more details though:
$ brew tap-info theory/sqitch
theory/sqitch: unpinned, 9 formulae
/Users/eric/programs/homebrew/Library/Taps/theory/homebrew-sqitch (46 files, 188K)
From: https://github.com/theory/homebrew-sqitch
Also:
$ brew cat sqitch_pg
Error: No such file or directory - /usr/local/README.md
and:
$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: git@github.com:Homebrew/homebrew.git
HEAD: e4e15f3c319cc552121347745af275a6b8eed099
Last commit: 15 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /Users/eric/programs/homebrew
HOMEBREW_CELLAR: /Users/eric/programs/homebrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.11.1-x86_64
Xcode: 7.2
CLT: N/A
Clang: 7.0 build 700
X11: N/A
System Ruby: 2.0.0-p645
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_60
I also ran brew doctor
which only reported unrelated warnings.
Looking at squitch_pg.rb
, this seems to be the culprit:
# Fool brew into not downloading anything by pointing it at its own README.
url "file://#{HOMEBREW_PREFIX}/README.md", :using => :nounzip
sha1 Pathname.new("#{HOMEBREW_PREFIX}/README.md").sha1
the README of homebrew is located at the root of the HOMEBREW_REPOSITORY
, not the HOMEBREW_PREFIX
.
In my setup at least, they are not identical.
I modified squitch_pg.rb
in the following way, and the install succeeded:
$ git diff sqitch_pg.rb | pbcopy
diff --git a/Formula/sqitch_pg.rb b/Formula/sqitch_pg.rb
index 567a7cf..281fbc2 100644
--- a/Formula/sqitch_pg.rb
+++ b/Formula/sqitch_pg.rb
@@ -7,8 +7,8 @@ class SqitchPg < Formula
depends_on 'postgresql'
# Fool brew into not downloading anything by pointing it at its own README.
- url "file://#{HOMEBREW_PREFIX}/README.md", :using => :nounzip
- sha1 Pathname.new("#{HOMEBREW_PREFIX}/README.md").sha1
+ url "file://#{HOMEBREW_REPOSITORY}/README.md", :using => :nounzip
+ sha1 Pathname.new("#{HOMEBREW_REPOSITORY}/README.md").sha1
def install
arch = %x(perl -MConfig -E 'print $Config{archname}')
$ brew install sqitch_pg
==> Installing sqitch_pg from theory/sqitch
(...)
🍺 /Users/eric/programs/homebrew/Cellar/sqitch_pg/0.9993: 11 files, 532K, built in 3 seconds
I opened a pull request: https://github.com/theory/homebrew-sqitch/pull/18
I am afraid I cannot use "brew install sqitch_pg" again, on OS X EI Capitan 10.11.5.
exactly the same situation
I ran
brew tap theory/sqitch
, thenbrew install sqitch_pg
fails with the following error: