aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-02-18 20:05:50 -0500
committerJack Nagel2015-02-18 20:35:47 -0500
commit3158c398af4517681b01cb92429e49d7546451e7 (patch)
treec5dd859ca361a4d516c3a8fa4e737e724825ace9 /Library
parent40087e30df7518114c47b570cc0c53898b0f678b (diff)
downloadbrew-3158c398af4517681b01cb92429e49d7546451e7.tar.bz2
Start recording the formula path in the install receipt
Later we can use this information to try and load the formula from the correct source.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/tab.rb33
1 files changed, 22 insertions, 11 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 135a5dcfc..453706bfe 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -11,16 +11,23 @@ class Tab < OpenStruct
FILENAME = 'INSTALL_RECEIPT.json'
def self.create(formula, compiler, stdlib, build)
- Tab.new :used_options => build.used_options.as_flags,
- :unused_options => build.unused_options.as_flags,
- :tabfile => formula.prefix.join(FILENAME),
- :built_as_bottle => !!ARGV.build_bottle?,
- :poured_from_bottle => false,
- :tapped_from => formula.tap,
- :time => Time.now.to_i,
- :HEAD => Homebrew.git_head,
- :compiler => compiler,
- :stdlib => stdlib
+ attributes = {
+ :used_options => build.used_options.as_flags,
+ :unused_options => build.unused_options.as_flags,
+ :tabfile => formula.prefix.join(FILENAME),
+ :built_as_bottle => !!ARGV.build_bottle?,
+ :poured_from_bottle => false,
+ :tapped_from => formula.tap,
+ :time => Time.now.to_i,
+ :HEAD => Homebrew.git_head,
+ :compiler => compiler,
+ :stdlib => stdlib,
+ :source => {
+ :path => formula.path,
+ },
+ }
+
+ new(attributes)
end
def self.from_file path
@@ -148,7 +155,11 @@ class Tab < OpenStruct
:time => time,
:HEAD => self.HEAD,
:stdlib => (stdlib.to_s if stdlib),
- :compiler => (compiler.to_s if compiler)})
+ :compiler => (compiler.to_s if compiler),
+ :source => {
+ :path => source[:path].to_s,
+ },
+ })
end
def write