diff options
| author | Jack Nagel | 2015-02-18 20:05:50 -0500 |
|---|---|---|
| committer | Jack Nagel | 2015-02-18 20:35:47 -0500 |
| commit | f98d1d660c38afe3caf1450b2443a6d5fab8a14b (patch) | |
| tree | 82a2839fb1bbc07c8bc8c53e2e3d404928040236 /Library/Homebrew | |
| parent | 3d861a8ae303c911c7ab10096b8d4c4770f97924 (diff) | |
| download | homebrew-f98d1d660c38afe3caf1450b2443a6d5fab8a14b.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/Homebrew')
| -rw-r--r-- | Library/Homebrew/tab.rb | 33 |
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 |
