Record tap-origin in the install-receipt
This commit is contained in:
parent
3d5b4af523
commit
598f7b69d9
@ -362,6 +362,15 @@ class Formula
|
|||||||
raise FormulaUnavailableError.new(name)
|
raise FormulaUnavailableError.new(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def tap
|
||||||
|
if path.realpath.to_s =~ %r{#{HOMEBREW_REPOSITORY}/Library/Taps/(\w+)-(\w+)}
|
||||||
|
"#$1/#$2"
|
||||||
|
else
|
||||||
|
# remotely installed formula are not mxcl/master but this will do for now
|
||||||
|
"mxcl/master"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def self.path name
|
def self.path name
|
||||||
HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb"
|
HOMEBREW_REPOSITORY+"Library/Formula/#{name.downcase}.rb"
|
||||||
end
|
end
|
||||||
|
|||||||
@ -17,8 +17,9 @@ class Tab < OpenStruct
|
|||||||
|
|
||||||
Tab.new :used_options => formula_options & arg_options,
|
Tab.new :used_options => formula_options & arg_options,
|
||||||
:unused_options => formula_options - arg_options,
|
:unused_options => formula_options - arg_options,
|
||||||
:tabfile => f.prefix + 'INSTALL_RECEIPT.json',
|
:tabfile => f.prefix + "INSTALL_RECEIPT.json",
|
||||||
:built_bottle => !!args.build_bottle?
|
:built_bottle => !!args.build_bottle?,
|
||||||
|
:tapped_from => f.tap
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.from_file path
|
def self.from_file path
|
||||||
@ -39,7 +40,8 @@ class Tab < OpenStruct
|
|||||||
rescue FormulaUnavailableError
|
rescue FormulaUnavailableError
|
||||||
Tab.new :used_options => [],
|
Tab.new :used_options => [],
|
||||||
:unused_options => [],
|
:unused_options => [],
|
||||||
:built_bottle => false
|
:built_bottle => false,
|
||||||
|
:tapped_from => ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -66,7 +68,8 @@ class Tab < OpenStruct
|
|||||||
def self.dummy_tab f
|
def self.dummy_tab f
|
||||||
Tab.new :used_options => [],
|
Tab.new :used_options => [],
|
||||||
:unused_options => f.options.map { |o, _| o},
|
:unused_options => f.options.map { |o, _| o},
|
||||||
:built_bottle => false
|
:built_bottle => false,
|
||||||
|
:tapped_from => ""
|
||||||
end
|
end
|
||||||
|
|
||||||
def installed_with? opt
|
def installed_with? opt
|
||||||
@ -81,7 +84,8 @@ class Tab < OpenStruct
|
|||||||
MultiJson.encode({
|
MultiJson.encode({
|
||||||
:used_options => used_options,
|
:used_options => used_options,
|
||||||
:unused_options => unused_options,
|
:unused_options => unused_options,
|
||||||
:built_bottle => built_bottle
|
:built_bottle => built_bottle,
|
||||||
|
:tapped_from => tapped_from
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user