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.
This commit is contained in:
parent
40087e30df
commit
3158c398af
@ -11,16 +11,23 @@ class Tab < OpenStruct
|
|||||||
FILENAME = 'INSTALL_RECEIPT.json'
|
FILENAME = 'INSTALL_RECEIPT.json'
|
||||||
|
|
||||||
def self.create(formula, compiler, stdlib, build)
|
def self.create(formula, compiler, stdlib, build)
|
||||||
Tab.new :used_options => build.used_options.as_flags,
|
attributes = {
|
||||||
:unused_options => build.unused_options.as_flags,
|
:used_options => build.used_options.as_flags,
|
||||||
:tabfile => formula.prefix.join(FILENAME),
|
:unused_options => build.unused_options.as_flags,
|
||||||
:built_as_bottle => !!ARGV.build_bottle?,
|
:tabfile => formula.prefix.join(FILENAME),
|
||||||
:poured_from_bottle => false,
|
:built_as_bottle => !!ARGV.build_bottle?,
|
||||||
:tapped_from => formula.tap,
|
:poured_from_bottle => false,
|
||||||
:time => Time.now.to_i,
|
:tapped_from => formula.tap,
|
||||||
:HEAD => Homebrew.git_head,
|
:time => Time.now.to_i,
|
||||||
:compiler => compiler,
|
:HEAD => Homebrew.git_head,
|
||||||
:stdlib => stdlib
|
:compiler => compiler,
|
||||||
|
:stdlib => stdlib,
|
||||||
|
:source => {
|
||||||
|
:path => formula.path,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
new(attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.from_file path
|
def self.from_file path
|
||||||
@ -148,7 +155,11 @@ class Tab < OpenStruct
|
|||||||
:time => time,
|
:time => time,
|
||||||
:HEAD => self.HEAD,
|
:HEAD => self.HEAD,
|
||||||
:stdlib => (stdlib.to_s if stdlib),
|
: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
|
end
|
||||||
|
|
||||||
def write
|
def write
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user